Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Memory paging
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=====Swappiness===== ''Swappiness'' is a [[Linux kernel]] parameter that controls the relative weight given to [[Virtual memory#Address space swapping|swapping out]] of [[Memory footprint|runtime memory]], as opposed to dropping [[Page (computer memory)|pages]] from the system [[page cache]], whenever a memory allocation request cannot be met from free memory. Swappiness can be set to a value from 0 to 200.<ref>{{cite web|url=https://www.kernel.org/doc/html/latest/admin-guide/sysctl/vm.html#swappiness|title=The Linux Kernel Documentation for /proc/sys/vm/}}</ref> A low value causes the kernel to prefer to evict pages from the page cache while a higher value causes the kernel to prefer to swap out "cold" memory pages. The [[Default (computer science)|default value]] is <code>60</code>; setting it higher can cause high latency if cold pages need to be swapped back in (when interacting with a program that had been idle for example), while setting it lower (even 0) may cause high latency when files that had been evicted from the cache need to be read again, but will make interactive programs more responsive as they will be less likely to need to swap back cold pages. Swapping can also slow down [[Hard disk drive|HDDs]] further because it involves a lot of random writes, while [[Solid-state drive|SSDs]] do not have this problem. Certainly the default values work well in most workloads, but desktops and interactive systems for any expected task may want to lower the setting while batch processing and less interactive systems may want to increase it.<ref name="kerneltrap">{{cite web |url=http://kerneltrap.org/node/3000 |title=Linux: Tuning Swappiness |first=Jeremy |last=Andrews |date=2004-04-29 |work=kerneltrap.org |archive-url=https://web.archive.org/web/20130524085654/http://kerneltrap.org/node/3000 |archive-date=2013-05-24 |url-status=dead |access-date=2018-01-03}} </ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)