{"id":2134,"date":"2016-06-29T17:37:09","date_gmt":"2016-06-29T21:37:09","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=2134"},"modified":"2016-09-30T12:52:17","modified_gmt":"2016-09-30T16:52:17","slug":"adjust-linux-swappiness","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/","title":{"rendered":"Adjust Linux Swappiness"},"content":{"rendered":"<p>Linux swap is a quick way to boost a machine&#8217;s resources. With a swap file or partition in place, a server will function as if it has additional RAM at its disposal. While adding swap will lessen the likelihood of out-of-memory errors, it comes at a performance cost as normally fast RAM is replaced by filesystem access. Should swap ever cause a noticeable performance hit, swappiness can be adjusted to increase this. Swappiness is a value that determines how aggressively the kernel attempts to use swap space. This change is especially significant on newer systems where RAM is cheap and plentiful.<\/p>\n<h2>Getting Started<\/h2>\n<p>To complete this guide, you will need the following:<br \/>\n\u2022 1 Node (<a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\">Cloud Server<\/a> or <a href=\"http:\/\/www.globo.tech\/dedicated-server-hosting\" target=\"_blank\">Dedicated Server<\/a>) with any Linux distribution installed. <\/p>\n<h2>Tutorial<\/h2>\n<p>Start by checking your current swappiness setting so you have a baseline. The default on CentOS and Ubuntu is 60. Here is how to check your current value:<\/p>\n<p><code>cat \/proc\/sys\/vm\/swappiness<\/code><\/p>\n<p>Let&#8217;s temporarily change the value to see how it affects performance. Here we&#8217;ll set the value to 10. We won&#8217;t save it permanently until we see how it works.<\/p>\n<p><code>sysctl vm.swappiness=10<\/code><\/p>\n<p>When you&#8217;ve found your ideal value, edit \/etc\/sysctl.conf. Set vm.swappiness=10, or whatever value you ultimately choose. This will make the change permanent.<\/p>\n<p><code>nano \/etc\/sysctl.conf<\/code><\/p>\n<p><code class=\"gris\">Then add \"vm.swappiness=10\" at the end of the file, were 10 is the desired value.<\/code><\/p>\n<h2>Conclusion<\/h2>\n<p>You now have a means of tweaking system performance should you ever require more swap, but find performance lacking once that space is used. If this guide was helpful to you, kindly share it with others who may also be interested. <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Linux swap is a quick way to boost a machine&#8217;s resources. With a swap file or partition in place, a server will function as if it has additional RAM at its disposal. While adding swap will lessen the likelihood of out-of-memory errors, it comes at a performance cost as normally fast RAM is replaced by<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-2134","post","type-post","status-publish","format-standard","hentry","category-web-hosting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Adjust Linux Swappiness - Globo.Tech<\/title>\n<meta name=\"description\" content=\"Linux swap is a quick way to boost a machine&#039;s resources. With a swap file or partition, a server will function as if it has additional RAM at its disposal.\" \/>\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.globo.tech\/learning-center\/adjust-linux-swappiness\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adjust Linux Swappiness - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"Linux swap is a quick way to boost a machine&#039;s resources. With a swap file or partition, a server will function as if it has additional RAM at its disposal.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-29T21:37:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-09-30T16:52:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\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.globo.tech\/learning-center\/adjust-linux-swappiness\/\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/\",\"name\":\"Adjust Linux Swappiness - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\"},\"datePublished\":\"2016-06-29T21:37:09+00:00\",\"dateModified\":\"2016-09-30T16:52:17+00:00\",\"author\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"Linux swap is a quick way to boost a machine's resources. With a swap file or partition, a server will function as if it has additional RAM at its disposal.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.globo.tech\/learning-center\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Adjust Linux Swappiness\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\/\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Adjust Linux Swappiness - Globo.Tech","description":"Linux swap is a quick way to boost a machine's resources. With a swap file or partition, a server will function as if it has additional RAM at its disposal.","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.globo.tech\/learning-center\/adjust-linux-swappiness\/","og_locale":"en_US","og_type":"article","og_title":"Adjust Linux Swappiness - Globo.Tech","og_description":"Linux swap is a quick way to boost a machine's resources. With a swap file or partition, a server will function as if it has additional RAM at its disposal.","og_url":"https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/","og_site_name":"Globo.Tech","article_published_time":"2016-06-29T21:37:09+00:00","article_modified_time":"2016-09-30T16:52:17+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/","url":"https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/","name":"Adjust Linux Swappiness - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-06-29T21:37:09+00:00","dateModified":"2016-09-30T16:52:17+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"Linux swap is a quick way to boost a machine's resources. With a swap file or partition, a server will function as if it has additional RAM at its disposal.","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/adjust-linux-swappiness\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"Adjust Linux Swappiness"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=2134"}],"version-history":[{"count":3,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2134\/revisions"}],"predecessor-version":[{"id":2864,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2134\/revisions\/2864"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=2134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=2134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=2134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}