Thursday, October 11, 2007

More RAM in my next job -- and multitasking limits (not enough RAM in my brain)

I've got a slow computer (800Mhz) with a reasonable amount of RAM (640MB) at work. My laptop is twice as fast, with twice as much memory. But of course, the laptop hard drive is slower than the desktop hard drive.

I've been twiddling my thumbs quite a lot lately because a lot of my work has been very disk intensive. I could be speeding things up by not doing svn update of 300MB of source, instead going to just the directories that have been modified and doing the svn update there, but then that would require knowing intimately what the other developers are doing. And *they* don't necessarily remember all the directories they committed into.

So, in my preference for dumb solutions that work all the time (e.g., svn update at the root of the tree) versus smart solutions that can easily fail (svn update to targeted directories, possibly missing other directories with fixes), I just svn update at the root. I do similar things with very large databases too, and very large file copies (rsync). The dumb solution that works all the time but is not always optimal is more cost-effective than the smart solution that will take three weeks to shake all the bugs and corner cases out of.

I'll optimize (spending that three weeks later on), when the need arises.

If I'm going to be doing much the same in my next job, then I'm going to require my employer to get me the right hardware. So I'll have 4GB of RAM (or more), and the fastest SCSI drives money can buy, in RAID-0 with rdiff-backup to RAID-1 slow SATA drives. And then I'm going to do all my svn work in a 2GB ramdisk. Hahahahaha.

I was discussing the edges of this (in the context of multitasking) with the boss of my boss and he said, "well, so you can do other things while waiting for those long tasks to finish, right?". This was in the context of a query that ran for 22 hours (and yes, I got pissed off enough at that to set up an aggregated materialized view built via triggers [postgresql] so that it now runs in an hour). At the time I said, yes, so I can multitask and need not twiddle my thumbs.

I'm finding that there are limits to multitasking though. I get confused and forget to do important steps when the list of tasks hits more than 5 or so. So its best to stick with 4-5 concurrent tasks. So if all 4 or 5 of those tasks take more than an hour, I'm back to twiddling my thumbs because I just don't do well if I add another task. As designated mentor at work, I don't actually have to twiddle my thumbs though. Instead, I can stick my nose into my colleagues work and offer unsolicited advice. Sometimes it's even good advice :-).

No comments: