It seems that sometimes, my computer will start swapping unnecessarily (memory usuage is ~25%), and I can't figure out why.
It seems to happen most often when running Perl scripts, but these aren't intensive scripts, and I can't find any thing saying that Perl can only see a certain amount of memory. The swap usage persists after the scripts finish, and even after closing Firefox, Banshee, etc. Restarting X will sometimes solve the problem, but other times, a full restart is required.
This becomes a big problem for me because as soon as whatever-it-is starts swapping, everything else seems to as well. Basic things like closing program or switching viewpoints take longer and longer. If left unchecked, this swap usage will eventually force my computer into indefinite thrashing, unable to even respond to keystrokes!
I'm running Ubuntu 9.04, 2.6.28-15 kernel, I've got 4GB of RAM, and am usually sitting at ~25% usage.
I've also tried lowering the "swappiness," with no luck.