Posts Tagged: tech

Text

Haven’t posted in a million years, so I’ll start off with an easy one.  We were listing the files in a directory using find [path] -type f -ls and dumping to a file.  Should work fine, right?  Except it was taking days (without exaggeration) to run, which was sort of cramping our style.

The problems were twofold:

  • NFS
  • Lots of subdirectories

Specifically, the mount was an NFS volume and one of the directories we were listing had lots (several hundred thousand!) of subdirectories.  This is generally considered “not best practices”, but it’s legacy and we haven’t rebuilt it to work w/ a different directory structure yet.  (We’ll get to that shortly.)

So for those of you that don’t know, directories don’t like having lots of subdirectories (or files). Different filesystems and operating systems handle things differently, but they pretty much all suck when dealing with more than a few thousand entries.  Normally, things like find get around this by utilizing the OS’s built-in filesystem cache.  The problem is, as a general rule, clients don’t cache things when accessing an NFS mount - since isn’t local and can’t be locked, cache can’t be consistently marked dirty and updated, etc. etc. etc. yadda yadda yadda.

So every time it was running through each subdirectory (or few), it was listing out the results of that one big directory (which was above these other directories in the path, right?).  Sigh.

The ghetto solution?  I did an ls of the directory and wrote a quick shell script to iterate through it w/ a few parallel find’s, rather than letting find do it by itself.  The end result of this experiment?  A performance improvement of nearly 10x (yes, an order of magnitude).  Instead of finishing in days, it’ll now finish in hours.  This is one of those things that’s obvious when you think about it, but really, how many people spend a lot of time thinking about running a “routine” find?

 

Pin It

Comments

Kids say the darnedest things. Especially in French.

Source: Engadget

 

Pin It

Comments

EMC buys Isilon

Passed along by a coworker.  Yikes.  This is pretty big news in the storage space.

 

Pin It

Comments

Don't use mysqldump

The url describes itself: “an argument for not using mysqldump in production”.  Read on, true believer.

 

Pin It

Comments

Rockmelt

So far, three separate people have sent me links to Rockmelt, a new social-networking focused browser.  I’m not sure why, but the fact that they’ve managed to convince so many of my friends that I need to know about it implies that if nothing else, they’ve done a heck of a job of marketing it.  ;)

 

Pin It

Comments

The World's Tiniest Open Source Violin

 

Pin It

Comments

MTTR > MTBF

John Allspaw’s latest post, on how MTTR is generally more important than MTBF, including his latest presentation on how it works at Etsy (and previously at Flickr).  I love reading his blog, pretty much everything he writes is dead-on, and not only that, but it’s stated and presented well.  If you’re not reading it, you should be.

Source: twitter.com

 

Pin It

Comments

Heh.

Heh.

Source: dilbert.com

 

Pin It

Comments

Apple Discontinues Xserve

Looks like Apple is pulling down its Xserve line in the beginning of the new year.  This isn’t shocking; it’s having so much success in the consumer space (first with desktops/ laptops, now with consumer electronics and ‘converged’ devices) that it probably doesn’t make sense.

Of course, this all could be an elaborate ruse to introduce a new generation of servers under a new name, as well.

 

Pin It

Comments

Awesome

Was just screwing around on Google Analytics, and noticed this link.

There’s something really awesome about seeing something you built in use in the wild, and even moreso, actually helping someone get stuff done and solve problems.  (In this case, it didn’t solve the problem, just showed him there was a problem.)

This is part of the reason I want to get more into the development side of the world, even if only on a “systems developer” level.  Being a sys admin, or in my case running an ops team, is great - interesting, challenging work.  But there’s something missing - that little moment where you get to say, “Hey, I did that”.  I don’t need that feeling constantly, but every now and then, it’s nice to get a little hit of it.

 

Pin It

Comments