What are the exact conditions under which Linux changes the memory process (s) from RAM to a page file?

My server has 8Gig of RAM and 8Gigs configured for the page file. I have memory intensive applications. These applications have peak loads during which we find an increase in swap usage. About 1 GIG swap is used.

I have another server with 4Gigs RAM and 8 Gig swap and similar intensive memory applications running on it. But here the use of swap is very minor. About 100 MB.

I was wondering what the exact conditions are or the rough formula on the basis of which Linux will swap the process memory in RAM to the page file. I know that it is based on a swapiness coefficient. What else is it based on? Paging file size? Any pointers to the documentation / source code of the Linux kernel explaining this will be great.

+5
source share
2 answers

I saw how many people published subjective explanations of what this does. Here, I hope, a more complete answer.

LRU 2.6.28 swappiness Linux , , , , LRU.

, , - , , , "", .

LRU / .

, , , 200 ( ​​200 , ( 0), .

swappiness, , swappiness, ( 60), swappiness, anon. , swappiness , 80 , (200-60 , 0 + 60 anon). , Linux, , 80 TIMES , , .

swappiness 100, 100 100 (200 - 100), LRU . , , , , , , -, anon- , .

+8

Linux ( ) ( 4Kb). . , , ( - ), , , ( , ..), .. : ( , / ), , .

, ​​ . w.r.t , ( linux kernel ).

Linux , nuking . , , . , , , , , . . .

swappiness = 0, Linux , . swappiness = 100 , . , swappiness 10, , / "vmstat". , . .:)

swappiness = 0. ( , , ).

:
http://www.linuxvox.com/2009/10/what-is-the-linux-kernel-parameter-vm-swappiness/
http://www.pythian.com/news/1913/

+5

All Articles