I have difficulties to understand swap policy. I have installed system (ubuntu 13.04 but 12.10 had same issue) with 4gb of swap partition because ux31a has 4 gb of memory.
Problem is that every time system run out of memory and starts to write to swap it stops to respond. Freezes for like 5 min.
So I thought after some readings that maybe I should set swapiness to 10 and I did. After system went out of memory - same issue.
Then I read SSD should not have any swap and I have set to turn swap off when system starts
Now I have swap turned off and my free -m looks like:
total used free shared buffers cached Mem: 3840 3340 499 0 33 1293 -/+ buffers/cache: 2013 1827 Swap: 0 0
Unfortunately problem remains unsolved. Looks like buffers/cache eat all memory and when memory gets to 0 I have exactly same issue. I thought buffers/cache should automatically free some memory when needed, but I think it doesn't
What can I do to avoid system freezes?
additional information: when system freezes after a while it may respond to some commends and I was able to get to console on different session (ctrl + alt + f1) and run "top". First processes kswapd0, kworkers have eaten whole CPU.
Thank you in advance for your help