Posts: 1,228
secipolla
Joined: 15 Jun 2008
#1
...but I was wondering why Debian automatically created a swap partition < RAM

Code: Select all

$ free
             total       used       free     shared    buffers     cached
Mem:       1034124     811500     222624          0      53300     354324
-/+ buffers/cache:     403876     630248
Swap:       969724          0     969724
Then I found
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.mjmwired.net/kernel/Documentation/power/interface.txt"
linktext was:"http://www.mjmwired.net/kernel/Document ... erface.txt"
====================================
/sys/power/image_size controls the size of the image created by
the suspend-to-disk mechanism. It can be written a string
representing a non-negative integer that will be used as an upper
limit of the image size, in bytes. The suspend-to-disk mechanism will
do its best to ensure the image size will not exceed that number. However,
if this turns out to be impossible, it will try to suspend anyway using the
smallest image possible. In particular, if"0" is written to this file, the
suspend image will be as small as possible.

Reading from this file will display the current image size limit, which
is set to 2/5 of available RAM by default.