Swappiness value

Discussion in 'all things UNIX' started by cet, Nov 14, 2012.

Thread Status:
Not open for further replies.
  1. cet

    cet Registered Member

    Joined:
    Sep 3, 2006
    Posts:
    867
    Location:
    Turkey/İzmir
    After reading articles about the swappiness value I changed it to 10.I see that while playing Castleville now I can surf internet better and I can open other applications such as Libre office quicker than before.Is there anything wrong about changing this value in the long term?
    I made this change temporary.If there is nothing wrong I will make it permanent.Thanks in advance.

    Ubuntu 12.04 LTS using XFCE
    Memory 2GB
    Pentium dual core 2.50Ghz x2

    Please do not tell me to add RAM because my motherboard does not support more than 2 GB of RAM.Asus P5 GCMX-1333
     
  2. Depending your hardware, you may hit a "brick wall of swapping" if your RAM runs out, as lots of stuff suddenly gets paged out. That's more with very low swappiness values though, e.g. 1 or 2; and will probably not happen with 2 GB of RAM.
     
  3. BrandiCandi

    BrandiCandi Guest

    I have only casually read about swap, but I was under the impression that swap isn't used much anymore in modern OS's- it was more important in older hardware & OSs.

    cet, can you link some of those articles you were reading? Thanks! :)
     
  4. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,698
    There's no reason for regular home use to make any changes.
    Mrk
     
  5. linuxforall

    linuxforall Registered Member

    Joined:
    Feb 6, 2010
    Posts:
    2,136
    I agree especially if you have 4GB or more RAM, it doesn't make an iota of difference.
     
  6. cet

    cet Registered Member

    Joined:
    Sep 3, 2006
    Posts:
    867
    Location:
    Turkey/İzmir
  7. mack_guy911

    mack_guy911 Registered Member

    Joined:
    Mar 21, 2007
    Posts:
    2,677
    please check this

    http://askubuntu.com/questions/103915/how-do-i-configure-swappiness


    30 seems good value to me it make programs open fast but same time you lack disk cache

    which effect some some things slow like for example hibernate if you use hibernate it slow on low swapping value i guess that why they put it default 60 not 30 but in case you dont use hibernate ...etc 30 is very good and safe value.


    please correct me if i am wrong so far i get this out of swapping............ in simple way although its pretty deep subject.

    hmmm .......... expect like mrk put more light on it. ;)
     
    Last edited: Nov 20, 2012
  8. Depends on the kernel version: http://lwn.net/Articles/467328/

    Edit: unless you mean "no changes to swappiness in particular." In which case I'd still beg to differ, at least for laptop users. I find that, with default settings, laptops with lots of RAM and slow hard drives tend to page out program memory before physical RAM is even half full - even though shrinking the filesystem cache hurts less.

    (And one could run with no swap, but that's dangerous because of the Linux OOM killer. Why Linux actively kills processes, instead of making malloc() fail and return null like every other OS on Earth, I have no idea.)
     
    Last edited by a moderator: Nov 25, 2012
Thread Status:
Not open for further replies.