Quick summary: Snow Leopard Server freezes randomly for periods somewhere between a few seconds and a minute or two. When the activity monitor is open, a huge IO spike will show up after the system defreezes. What's causing this?
Full details: Snow Leopard Server is running on a 2010 Mac Mini Server. The bouts of freezing only started a few weeks ago. It was definitely after 10.6.7 came out but prior to 10.6.8, which didn't fix whatever it was. If I'm using things very casually, like the terminal or Microsoft Word, things are fine. However, if I start copying files, browsing the web, or, say, playing a video, things freeze up.
During a freeze, the mouse keeps working (I wouldn't really know about the keyboard since I'm not generally where I would type something anyway while it's frozen). I'm even able to click on items in the dock, and they react partially to being clicked, but if I try to run a program or open a folder off the dock, for example, it won't do anything besides the "having been clicked" animation until after it unfreezes. If a video is playing during the freeze, the visual part will be frozen but the audio continues normally.
I originally thought this to be a problem with Spotlight based on digging around in forums and sites like this for similar issues, but it continued happening even after I'd killed Spotlight. The next most likely thing would be a hard drive issue. I took someone's suggestion of backing up the drive and then attempting to force a write to bad sectors by doing a zeroing-out disk erase. This started up with an estimate of 7 hours or so but after 7 hours it had an estimate of 17 hours, and 12 hours after that had an estimate of 19 hours or so. Unfortunately, there was no percentage to be looking at as far as the progress bar, but I couldn't tell if it had gone anywhere all that time but a third or less into the drive. I cancelled the drive erase and attempted to reinstall the OS. That too stalled indefinitely.
Next, I took it to the Apple Store, since it's still under warranty. After waiting well after my appointment time, the assigned "Genius" rushed through all the appointment motions and seemed to be inclined to replace the drive. After waiting over a week, I got the machine back with a clean install of Snow Leopard. After letting the system do its thing with an array of updates, it seemed fine, although some signs of lagging again cropped up as I copied installer DMGs from backup to reinstall my programs, but I didn't directly think much of it since those are actual activities that really can slow a system down.
So obviously, the problem is now back in full. Copying files to another machine blazes by for the first few seconds, with an estimate that the whole file will be copied in a minute. This goes up to 8 or 10 minutes as it randomly hangs in the middle of a file copy, but then it defreezes after a while and the estimate goes back to normal and the file finishes copying. If I'm browsing a random site, it'll sometimes freeze in the middle of me scrolling through a page. And so forth.
I was foolish enough not to note the drive serial number before taking it to the store, so I'm not altogether convinced someone there didn't just have better luck reinstalling the OS than I did and leaving in the old drive. Before I take it in again and potentially have to reinstall everything again, I was hoping to find some other things to check/try. What else might be causing this? And how might I look into tracking down the source of the IO spikes?