[Systems] Sunjammer Swapping

Samuel Cantero scanterog at gmail.com
Thu Dec 31 09:05:59 EST 2015


Hello guys,

I was checking Sunjammer and I found the currently we are swapping around
407 MB but we have plenty of physical memory free yet.

Free -m shows:

                  total       used         free     shared    buffers
cached
Mem:         11992     11673        319          0       1539       5981
-/+ buffers/cache:      4151       7841
Swap:         8191         407       7784

According to this, we have around 7841 MB free (~ 319 + 1539 + 5981). We
must consider that buffers and cache memory are unused memory that Linux
borrows for disk caching (for improve performance). But at the end this is
free memory. Applications can dispose of it immediately.

So what are we swapping? The answer is the swappiness value. This is a
tweakable
setting that controls how often the swap file is used. A swappiness setting
of zero means that the disk will be avoided unless absolutely necessary (we
run out of memory), while a swappiness setting of 100 means that programs
will be swapped to disk almost instantly.

By default, Ubuntu comes with a default value of 60 (cat
/proc/sys/vm/swappiness). This means that the swap memory will be used
quite often is the memory usage is over the half usage. I consider that we
should lower this value to 10. With this setting, the swap memory will be
only used when the RAM usage is around 90%. We want to avoid disk usage as
long as possible.

Suggestions and comments are welcome.

Best regards,

Samuel C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/systems/attachments/20151231/a40e8510/attachment.html>


More information about the Systems mailing list