System ground down to a halt

Paul Smith paul at mad-scientist.net
Fri May 20 16:51:03 UTC 2016


On Thu, 2016-05-19 at 16:56 -0700, MR ZenWiz wrote:
> I have 16GB of RAM with almost 13GB of swap space (holdover from when
> I only had 8GB - never updated).  I'm running on an i7 (effectively 8
> CPUs).

The old adage of "swap = 0.5x RAM" makes no sense for systems with >4G
RAM, which many systems have nowadays.

Personally I would never add more than 2G swap to any of my systems,
regardless of how much RAM they have.  13G swap is _really_ asking for
trouble.

If you start to swap out more than 2G worth of RAM your system is going
to be extremely unresponsive for a significant period of time, no
matter what.  I would personally always prefer the OOM killer to come
along and whack a process or two if my system runs out of memory, than
have it sit there and thrash through paging 13G (!!) of RAM to disk and
back again...  yikes!

Swap is not free: you pay for it in time spent waiting for it.  To me
time is WAY more valuable.




More information about the ubuntu-users mailing list