Let's try a little more swap

I'm still having intermitent problems with my Kubuntu box just dying on me. This has been going on for a while and I can't figure out what the problem is. See, every now and then, the hard drive will just start thrashing like crazy and the system will go completely unresponsive. If I leave it alone for five or ten minutes, sometimes it will come back to life. Then again, sometimes it won't and my only option is to hit the reset button.

The problem appears to be something with X. If I catch it before it goes completely non-responsive, sometimes I can hit ctrl+alt+backspace and restart X. After that, it's just fine. I appears to be some kind of memory leak, as I found some messages in the system logs once that indicated processes were being killed due to insufficient memory. It's probably a slow leak, since it usually only gives me problems after I've been logged in and working for a long time. I haven't been able to connect the lock ups to any particular application, but it most often happens when I'm using Opera or Kontact. However, that doesn't necessarily mean anything because I'm nearly always running Opera and Kontact.

Anyway, I decided to mitigate the problem by adding some more swap space to my system. I've got half a gig of RAM in my current system, but only had about 256 MB of swap space due to an old partition scheme. So I decided to take that old 200MB partition I had been using as /var under an old Slackware installation and repurpose it to swap.

I'd never actually manually configured a swap partition before, but it turned out to be surprisingly easy. I had assumed I would need to change the partition type, but according the the mkswap man page, Linux doesn't actually check the type of the partition. So, basically, all I did was run mkswap -c /dev/hda5, change the /etc/fstab entry to mark the device as a swap partition, and run swapon -a. Now I've got another 200MB of swap space. We'll see if it makes any difference. At the very least, I'm hoping it will buy me enough time to notice the problem before the system locks up.

You can reply to this entry by leaving a comment below. You can send TrackBack pings to this URL. This entry accepts Pingbacks from other blogs. You can follow comments on this entry by subscribing to the RSS feed.

Add your comments #

A comment body is required. No HTML code allowed. URLs starting with http:// or ftp:// will be automatically converted to hyperlinks.