{"id":2732,"date":"2019-07-14T21:18:13","date_gmt":"2019-07-14T15:48:13","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/blog\/?p=2732"},"modified":"2019-07-14T21:18:15","modified_gmt":"2019-07-14T15:48:15","slug":"what-is-the-swappiness-value-in-linux-and-how-to-modify-it","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/","title":{"rendered":"What is the swappiness value in Linux and how to modify it?"},"content":{"rendered":"\n<p>It is one of feature available in Linux operating system which is \nresponsible &nbsp;degree to which the kernel prefers to swap memory to fulfil\n the system memory requirement. The parameter value varies from 0 to \n100. In Linux system default value set to 60. A low value result kernel \nwill try to avoid swapping unless there is almost RAM is full for \nprocess on system. The higher value would force kernel aggressively to \nmoved out memory pages from the physical memory to swap memory.<\/p>\n\n\n\n<p>If we set higher value then there may be negative impact on the  system cause when system accessing the swap memory (which is part of the  hard drive) then system operations being bit slow as compare to the RAM  as RAM is faster than the hard drive. To read\/write system directly on  hard drive will take time so it\u2019s best to avoid transfer active memory  pages to swap memory aggressively.<\/p>\n\n\n\n<p>To check the default value use command:<\/p>\n\n\n\n<p><strong># cat \/proc\/sys\/vm\/swappiness<\/strong><\/p>\n\n\n\n<p><strong>60<\/strong><\/p>\n\n\n\n<p>-To modify the parameter use command:<\/p>\n\n\n\n<p><strong>#echo 40 &gt; \/proc\/sys\/vm\/swappiness<\/strong><\/p>\n\n\n\n<p>-To affect the changes use :<\/p>\n\n\n\n<p><strong># sysctl -p<\/strong><\/p>\n\n\n\n<p>-Verify the parameter use :<\/p>\n\n\n\n<p><strong># sysctl -a | grep swappiness<\/strong><\/p>\n\n\n\n<p><strong>&nbsp; &nbsp;vm.swappiness = 40<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is one of feature available in Linux operating system which is responsible &nbsp;degree to which the kernel prefers to swap memory to fulfil the system memory requirement. The parameter value varies from 0 to 100. In Linux system default value set to 60. A low value result kernel will try to avoid swapping unless [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[34],"tags":[112,115,199],"class_list":["post-2732","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux","tag-swap","tag-swappiness"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is the swappiness value in Linux and how to modify it? | 24x7serversupport Blog<\/title>\n<meta name=\"description\" content=\"What is the swappiness value in Linux and how to modify it?\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is the swappiness value in Linux and how to modify it? | 24x7serversupport Blog\" \/>\n<meta property=\"og:description\" content=\"What is the swappiness value in Linux and how to modify it?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-14T15:48:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-07-14T15:48:15+00:00\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/\",\"name\":\"What is the swappiness value in Linux and how to modify it? | 24x7serversupport Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"datePublished\":\"2019-07-14T15:48:13+00:00\",\"dateModified\":\"2019-07-14T15:48:15+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"description\":\"What is the swappiness value in Linux and how to modify it?\",\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is the swappiness value in Linux and how to modify it?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is the swappiness value in Linux and how to modify it? | 24x7serversupport Blog","description":"What is the swappiness value in Linux and how to modify it?","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/","og_locale":"en_US","og_type":"article","og_title":"What is the swappiness value in Linux and how to modify it? | 24x7serversupport Blog","og_description":"What is the swappiness value in Linux and how to modify it?","og_url":"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/","og_site_name":"24x7serversupport Blog","article_published_time":"2019-07-14T15:48:13+00:00","article_modified_time":"2019-07-14T15:48:15+00:00","author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/","url":"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/","name":"What is the swappiness value in Linux and how to modify it? | 24x7serversupport Blog","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"datePublished":"2019-07-14T15:48:13+00:00","dateModified":"2019-07-14T15:48:15+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"description":"What is the swappiness value in Linux and how to modify it?","breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/what-is-the-swappiness-value-in-linux-and-how-to-modify-it\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What is the swappiness value in Linux and how to modify it?"}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=2732"}],"version-history":[{"count":1,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2732\/revisions"}],"predecessor-version":[{"id":2733,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2732\/revisions\/2733"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=2732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=2732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=2732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}