LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-16-2013, 09:57 PM   #1
LostObjext
LQ Newbie
 
Registered: Oct 2013
Posts: 4

Rep: Reputation: Disabled
What does swappiness do ?


What does swappiness do? I search it on wiki, but they explained it that I don't really fully understand. Any easy and simple way to explain it to me?
 
Old 10-16-2013, 10:02 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,861
Blog Entries: 18

Rep: Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339
Wikipedia can help. https://en.wikipedia.org/wiki/Swappiness
 
Old 10-16-2013, 10:03 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,557

Rep: Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116
The linux swap is used like a Windows paging file. It stores memory (from RAM) that hasn't been used in some time, to free up RAM for active processes that need it. It is also used as a dump location when the system runs out of RAM so that the computer doesn't lock up entirely (though if your swap is located on a typical HDD, the system might as well be locked up since response times will drop into the minutes or longer).

swappiness is a value that tells the kernel how aggressively it should dump old memory from RAM into the swap (in other words, it defines what "old" means). Setting the swappiness to 0 prevents the kernel from ever dumping old memory onto the swap (the swap will still be used if you run out of RAM and the machine needs a dump location though).


Personally, I feel that swappiness is an outdated parameter, a remnant from when RAM was expensive and it was necessary for the OS to dump RAM data to the HDD occasionally to keep some available RAM for the occasional process that needed it. These days, RAM is so incredibly cheap that there's really no reason not to over-deliver on RAM and prevent the need for swap entirely. On all of the systems I build (as of the last 5 years or so, back when RAM prices plummeted), I install more than enough RAM to cover the requirements of the job, set up some swap space as "backup", and set swappiness to 0.

Last edited by suicidaleggroll; 10-16-2013 at 10:14 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reducing swappiness value 5.2.8 starkadder Puppy 8 11-26-2011 02:22 AM
[SOLVED] Swappiness parameter Mr. Alex Linux - Newbie 1 01-12-2011 10:32 AM
swappiness deactivated? norbert74 Linux - Kernel 7 11-23-2007 12:31 PM
Swappiness Jake_B Red Hat 1 10-21-2005 03:59 PM
Swappiness of kernel debian_dummy Debian 10 06-10-2004 04:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration