How Often Is Kernel “touching” Swap Partition?

Home » CentOS » How Often Is Kernel “touching” Swap Partition?
CentOS 4 Comments

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

4 thoughts on - How Often Is Kernel “touching” Swap Partition?

  • Martin Šťastný wrote:
    /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

  • Thank you for you responses,

    first of all I need same amount of swap space as of memory, because I want to use hibernation. Problem of placing swap partition on SSD is not with too many writes, but with to much space used for nothing (in my case 8 GB,
    16 GB in not so far future). I know about “swappiness” kernel tunable, but I guess it has nothing to do with how often is partition “simply touched for nothing” and therefore hard drive is spinned up. For example – if I set HDD to spin down after two minutes and kernel will touch swap approximately every five minutes, it means that hard drive will be spinned up 120 times every day (10 hours of power on), 43 800 cycles per year which will definitely wreck my HDD :-(.

    2013/7/23 Jorge Fábregas

    CentOS mailing list CentOS@CentOS.org http://lists.CentOS.org/mailman/listinfo/CentOS

  • You know that you don’t need a swap partition for hibernation?
    s2disk(uswsusp) makes a swapfile on your hdd prior to hibernating and only activates it for hibernation purposes, so you don’t have to have swap active all the time.

LEAVE A COMMENT