{"id":545,"date":"2020-12-10T09:54:49","date_gmt":"2020-12-10T09:54:49","guid":{"rendered":"https:\/\/www.velaninfo.com\/rs\/?post_type=techtips&#038;p=545"},"modified":"2021-10-05T05:28:44","modified_gmt":"2021-10-05T05:28:44","slug":"how-to-free-cached-and-buffer-memory-on-linux","status":"publish","type":"techtips","link":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-free-cached-and-buffer-memory-on-linux\/","title":{"rendered":"How to clear Cache &#038; Buffer Memory on Linux?"},"content":{"rendered":"<p>The Linux Page Cache (File System Cache) is used to make IO operations faster. Sometimes in certain circumstances as an administrator need to manually clear the cache. In this article we will share the steps on how to clear Cache and buffer memory.<\/p>\n<p>The following steps are to clear Cached memory on <a href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/\"><strong>Linux Servers<\/strong><\/a><\/p>\n<p>Use the free command to find the cache memory used by Linux OS<\/p>\n<p><strong># free -m<\/strong><\/p>\n<p>The result for the above command is as follows \u2013<\/p>\n<p><strong>total\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 used\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 free \u00a0\u00a0\u00a0\u00a0shared\u00a0\u00a0\u00a0 buffers\u00a0\u00a0\u00a0\u00a0 cached<\/strong><\/p>\n<p><strong>Mem:\u00a0 \u00a0 \u00a016050\u00a0 \u00a0 15908\u00a0 \u00a0142\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0 \u00a0 \u00a0120\u00a0\u00a0\u00a0\u00a0\u00a0 14953<\/strong><\/p>\n<p><strong>-\/+ buffers\/cache:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 834\u00a0\u00a0\u00a0\u00a0\u00a0 15216<\/strong><\/p>\n<p><strong>Swap:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<\/strong><\/p>\n<p>The following command clears the Page Cache and Inodes<\/p>\n<p><strong># sync; echo 3 &gt; \/proc\/sys\/vm\/drop_caches<\/strong><\/p>\n<p>The following command clears the Inodes<\/p>\n<p><strong># sync; echo 2 &gt; \/proc\/sys\/vm\/drop_caches<\/strong><\/p>\n<p>The following command clears the Page Cache only<\/p>\n<p><strong># sync; echo 1 &gt; \/proc\/sys\/vm\/drop_caches<\/strong><\/p>\n<p>If you are required to clear the cache regularly, you can create a cron job that would run automatically<\/p>\n<p>The following command creates the new cron job<\/p>\n<p><strong># crontab -e<\/strong><\/p>\n<p>Add the following entry to the cron job file to execute every hour<\/p>\n<p><strong>0 * * * * sync; echo 3 &gt; \/proc\/sys\/vm\/drop_caches\u00a0<\/strong><\/p>\n<p>At <strong><a href=\"https:\/\/www.velaninfo.com\">Velan<\/a><\/strong>, our server support engineers can help you to free cached memory on your Linux Server. For details, please visit <a href=\"https:\/\/www.velaninfo.com\/mservices\/managed-it-services\">https:\/\/www.velaninfo.com\/mservices\/managed-it-services<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Linux Page Cache (File System Cache) is used to make IO operations faster. Sometimes in certain circumstances as an administrator need to manually clear the cache. In this article we will share the steps on how to clear Cache and buffer memory. The following steps are to clear Cached memory on Linux Servers Use&#8230;<a class=\"continue-reading text-uppercase\" href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-free-cached-and-buffer-memory-on-linux\/\"> Continue Reading <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/themes\/velaninfo\/images\/reading_arw.png\" alt=\"Continue Reading\" width=\"16\" height=\"12\"\/><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[],"class_list":["post-545","techtips","type-techtips","status-publish","hentry","Categories_tech_tip-linux","Categories_tech_tip-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v19.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to free cached Memory from Linux Operating System | Velan<\/title>\n<meta name=\"description\" content=\"The Linux Page Cache is used to make IO operations faster. Sometimes in certain circumstances as an administrator need to manually clear the cache.\" \/>\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.velaninfo.com\/rs\/techtips\/how-to-free-cached-and-buffer-memory-on-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to clear Cache &amp; Buffer Memory on Linux?\" \/>\n<meta property=\"og:description\" content=\"The Linux Page Cache is used to make IO operations faster. Sometimes in certain circumstances as an administrator need to manually clear the cache.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-free-cached-and-buffer-memory-on-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Velan\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-05T05:28:44+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-free-cached-and-buffer-memory-on-linux\\\/\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-free-cached-and-buffer-memory-on-linux\\\/\",\"name\":\"How to free cached Memory from Linux Operating System | Velan\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\"},\"datePublished\":\"2020-12-10T09:54:49+00:00\",\"dateModified\":\"2021-10-05T05:28:44+00:00\",\"description\":\"The Linux Page Cache is used to make IO operations faster. Sometimes in certain circumstances as an administrator need to manually clear the cache.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-free-cached-and-buffer-memory-on-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-free-cached-and-buffer-memory-on-linux\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-free-cached-and-buffer-memory-on-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tech Tips\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to clear Cache &#038; Buffer Memory on Linux?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\",\"name\":\"Velan\",\"description\":\"Velaninfo Services India Pvt Ltd\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to free cached Memory from Linux Operating System | Velan","description":"The Linux Page Cache is used to make IO operations faster. Sometimes in certain circumstances as an administrator need to manually clear the cache.","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.velaninfo.com\/rs\/techtips\/how-to-free-cached-and-buffer-memory-on-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to clear Cache & Buffer Memory on Linux?","og_description":"The Linux Page Cache is used to make IO operations faster. Sometimes in certain circumstances as an administrator need to manually clear the cache.","og_url":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-free-cached-and-buffer-memory-on-linux\/","og_site_name":"Velan","article_modified_time":"2021-10-05T05:28:44+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-free-cached-and-buffer-memory-on-linux\/","url":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-free-cached-and-buffer-memory-on-linux\/","name":"How to free cached Memory from Linux Operating System | Velan","isPartOf":{"@id":"https:\/\/www.velaninfo.com\/rs\/#website"},"datePublished":"2020-12-10T09:54:49+00:00","dateModified":"2021-10-05T05:28:44+00:00","description":"The Linux Page Cache is used to make IO operations faster. Sometimes in certain circumstances as an administrator need to manually clear the cache.","breadcrumb":{"@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-free-cached-and-buffer-memory-on-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-free-cached-and-buffer-memory-on-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-free-cached-and-buffer-memory-on-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.velaninfo.com\/rs\/"},{"@type":"ListItem","position":2,"name":"Tech Tips","item":"https:\/\/www.velaninfo.com\/rs\/techtips\/"},{"@type":"ListItem","position":3,"name":"How to clear Cache &#038; Buffer Memory on Linux?"}]},{"@type":"WebSite","@id":"https:\/\/www.velaninfo.com\/rs\/#website","url":"https:\/\/www.velaninfo.com\/rs\/","name":"Velan","description":"Velaninfo Services India Pvt Ltd","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.velaninfo.com\/rs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips"}],"about":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/types\/techtips"}],"author":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/comments?post=545"}],"version-history":[{"count":5,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/545\/revisions"}],"predecessor-version":[{"id":1476,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/545\/revisions\/1476"}],"wp:attachment":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/media?parent=545"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/tags?post=545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}