Martin Šťastný
2013-Jul-23 17:22 UTC
[CentOS] How often is kernel "touching" swap partition?
Hello, I am going to buy new laptop with two drives, one SSD and one HDD and I want to place swap partition on HDD which will be most time unused and therefore spinned down. Problem is, that I don't know, if or how often is kernel touching swap space even if there is lot of free memory and thus spinning HDD up. Thank you in advance
m.roth at 5-cent.us
2013-Jul-23 18:04 UTC
[CentOS] How often is kernel "touching" swap partition?
Martin ??astn? wrote:> Hello, > > I am going to buy new laptop with two drives, one SSD and one HDD and I > want to place swap partition on HDD which will be most time unused and > therefore spinned down. Problem is, that I don't know, if or how often is > kernel touching swap space even if there is lot of free memory and thus > spinning HDD up. >You should partition your drives anyway: a small, like 1G, partition for /boot. For swap, the old Received Wisdom was 2-2.5 times RAM; these days, it's "make swap to be 2G (for emergencies). Put swap on the SSD, I *guess*... if it's enterprise grade, and not "consumer grade", which will eventually give up with too many writes. mark
Jorge Fábregas
2013-Jul-23 18:05 UTC
[CentOS] How often is kernel "touching" swap partition?
On 07/23/2013 01:22 PM, Martin ??astn? wrote:> how often is kernel touching swap spaceThere's a kernel tunable called "swappiness" [1] to control that. You can add an entry in /etc/sysctl.conf like this: vm.swappiness=0 ...and the kernel will avoid, as much as it can, to use swap. HTH, Jorge [1]: http://en.wikipedia.org/wiki/Swappiness