When I open an application for which there is not enough memory, Ubuntu becomes unresponsive. The problem seems to arise from the way Ubuntu handles swap (as kswapd
hogs CPU usage in such a situation). Other operating systems I've used such as Windows or Mac OS warn you when there is not enough RAM available but in Ubuntu the system becomes unresponsive for quite a while. Sometimes I have to restart the computer.
I've had this problem with various versions of Ubuntu from Hardy Heron and with several different computers with different RAM sizes.
I use
to turn off the swap.