- When does swap start to be used? Is it when the memory is fully used? Or when the memory hasn't been fully used?
- When does a process get an "Out of memory" error and be killed by the kernel? is it when both RAM and swap are fully used? or just when RAM is?
Asked
Active
Viewed 1,434 times
5

Tim
- 101,790
-
Check this thread too http://unix.stackexchange.com/questions/134202/when-is-swap-triggered-or-how-to-calculate-swap-tendency – Sreeraj Dec 29 '14 at 06:24
1 Answers
7
When swap starts to be used is dependent on how you have your swappiness kernel parameter set. At swappiness 0 swapping will only occur when memory is fully used and at 100 it will occur as soon as possible. The default value is 60.
OOM errors occur when RAM and swap are completely full.

Cthulhu Tentacles
- 539
- 3
- 7
-
Thanks. I found that Imagick's command
convert
will write temporary files to/tmp
, when RAM is full, is that swapping from RAM to swap? – Tim Dec 29 '14 at 12:01 -