This almost sounds exactly like a problem I had with an older system of mine that ran RH9.
It was also a relatively low spec system, and it exhibited pretty much the same behaviour.
The problem turned out to be twofold, and reasonably simple to solve.
Check if the kernel you have running on that machine has DMA enabled. It sometimes happens that a stock distro kernel does not have full motherboard chipset support. This can cause the kernel to run without DMA on certain motherboards, drastically slowing performance, and almost coming to a stop as the disk swap is thrashed in low memory conditions.
To check, open a terminal, become root and try
/sbin/hdparm -d1 -c1 /dev/hda
Substitute /dev/hda for whatever device name is assigned to the harddisk on that system. (To find the name, try "df -mh" - without the quotes - in a terminal)
If you get a HDIO_..... errors, this most likely means that your motherboard chipset drivers are not present in the running kernel.
To fix this, you'll need to recompile the kernel with support for your motherboard chipset. In the instance I mention about myself above, I downloaded a newer kernel which did have ATI IXP-300 support (if I remember right), configured that kernel to have those modules active, compiled and installed it, and BANG the slowdowns and stops were mostly gone...
There is an option when compiling a kernel where you can "tune" it to be "pre-emptible". A "pre-emptible" kernel is also called a "desktop" kernel, and compiles the kernel so that it will be predisposed to giving a good "desktop" experience - quick reaction to clicks and user input and such. This is the opposite of "non pre-emptible" or so called "server" kernels, which (as I understand it) give more "attention" to network throughput and background services, at the cost of reduced desktop responsiveness / behaviour.
I. e. along with the DMA kernel recompile I mention above, you can try (since you ARE recompiling / compiling the kernel anyway) to set the kernel config to a pre-emtible kernel, and see if this helps. Most distro kernels are already pre-emptible these days, but you never know.
If none of the above work, you can also try downloading the latest kernel from kernel.org and compile that and see if it helps. I don't know Ubuntu at all, but the kernel that might be on there might be an older or out of date one.