Re: Swappiness default



On 05/23/2011 10:51 AM, Hakan Koseoglu wrote:

Setting the swappiness to 0 delays any swaps until you've run out of
RAM completely and only then it starts writing to disk. As a result if
you have a lot of RAM, it's preferrable. On the other hand, when you
run out of memory, it will start heavily swapping immediately (depends
on how many processes want to grab the lot).

If you set it to a high number, the system will housekeep very often
and you will experience slow downs when you really don't need any (I
have 2GB free, why are you swapping 1GB, oh the wise kernel?)...


Because using ram to cache frequently accessed files (such as mem-mapped libraries, as an example) is much better for overall system performance than holding little used pages of application ram. Course, if you have objective benchmarks that contradict this...... (yeah, I know, I'm not providing any either. But without proof otherwise, I'm going with the opinion of those who actually performance test the kernel with measurable metrics)

You should also keep in mind that a page is swap can also be in Ram at the same time. Being in swap only means that that ram can be quickly paged out instantly at need. Again, overall better system speed is achieved.



--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: swap size for 2gb 2 processors?
    ... out a partition magic run on a 120 gb disk, ... The rule of thumb is 2 * RAM size, in your case that would be 4G. ... price for a swap partition has remained reasonably constant. ...
    (comp.os.linux.misc)
  • Re: [ck] swap prefetching merge plans
    ... After I close some memory demanding aplication that caused huge portion of the memory to be swapped out to disk, the time needed to swith back to firefox or eclipse is really really shorter. ... And software engeneerers and programmers are really working hard to eat all your RAM even if you think that "now you have really much". ... I have so much swap because I am compiling I my packages on tmpfs. ...
    (Linux-Kernel)
  • Re: headsup: swap_pager.c
    ... disk could not keep up with page-in demand. ... "add" another disk while the box is spasticly trying to swap ... around a 200M plus working-set into 32M physical RAM. ... bash me more...I still dont understand why you are trying to fix ...
    (freebsd-arch)
  • Re: VM system - memory seems to be running out, when its not
    ... No extra RAM allocation would occur until the pages are used. ... amount of RAM as a swap space. ... The VM space can have a dedicated area on disk. ...
    (comp.unix.solaris)
  • Re: excessive swap-in time
    ... Trying to do it all with RAM is just inefficient. ... I find that does not work well when the swapping is caused by excessive I/O ... Or you could have 5 TB of swap space. ...
    (comp.os.linux.development.system)