Do I still need swap space?

About three years ago I replaced our primary database. For years we’d been plagued by awful performance in the database and we were never able to diagnose the problem. The original server was a real beast at the time: 8 Opterons (single core), 32 gigs ram, and a fibre channel RAID connected via a QLogic HBA. This was back in 2005, so those specs don’t probably sound that impressive today, but this was a crazy configuration (with a crazy price tag to match). On paper it looked like this server should be basically invincible but the performance was awful, slowing down every process within the company. We contacted a few different companies (including CommandPrompt, which employs several of the core Pg devs) to see if they could assist us in diagnosing the problems but tuning only helped to a point. There was just something wrong with the box, maybe having to do with the FC HBA itself (which nobody knew much about).
Continue reading “Do I still need swap space?”

I partitioned my laptop so stupidly.

When I first installed Linux on my laptop (on my old hard drive) I did it as dual-boot, so I resized my Windows XP partition down to 50 GB, created a 2nd partition for Linux and installed it there. I think I played around with Fedora and Ubuntu and one other distro (maybe FreeBSD?) so I had a bunch of stupid partitions. I eventually went to Linux exclusively and repurposed my XP partition to be my home directory (/docs) and moved all my documents there.

Then I moved to an SSD, which in addition to being incalculably faster than the Seagate Momentus 5400rpm drive, was also bigger – 128 GB instead of 100 GB. This was good, except that my method of moving the data from old drive to new drive was “dd if=/dev/sda of=/dev/sdb”, doing a bit copy from the old drive to the new one. This worked, but it left the old partition table in place on the new drive, basically leaving the extra 28 GB invisible. I didn’t realize this until a couple of weeks ago when I extended the “rear” partition to consume the rest of the space on the disk.

Anyway, now I have this totally stupid partition scheme on the disk:

Retarded partitioning scheme
Retarded partitioning scheme

I could fix it but it seems like a big pain in the ass. Maybe I can clear out /dev/sd8 and copy my docs to it, then copy the root partition to /dev/sda1… Oh, I don’t know. This is why my rule of thumb about partitioning is: don’t.