{"id":2111,"date":"2024-03-12T09:15:00","date_gmt":"2024-03-12T09:15:00","guid":{"rendered":"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linux\/"},"modified":"2024-04-03T16:12:48","modified_gmt":"2024-04-03T16:12:48","slug":"how-to-release-cache-memory-in-linuxf","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/","title":{"rendered":"How to release cache memory in Linux?"},"content":{"rendered":"<p>To release cache memory, you can use the following methods:<\/p>\n<ol>\n<li>To use the sync command: the sync command can write data from the cache to the hard drive and release the associated memory. Enter the following command in the terminal:<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code>sync\r\n<\/code><\/pre>\n<ol>\n<li>\u4f7f\u7528echo\u547d\u4ee4\u6e05\u7406\u7f13\u5b58\uff1a\u53ef\u4ee5\u901a\u8fc7echo\u547d\u4ee4\u5411\/proc\/sys\/vm\/drop_caches\u6587\u4ef6\u4e2d\u5199\u5165\u6570\u503c\u6765\u6e05\u7406\u7f13\u5b58\u3002\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code>echo 1 &gt; \/proc\/sys\/vm\/drop_caches  #\u6e05\u7406\u9875\u9762\u7f13\u5b58\r\necho 2 &gt; \/proc\/sys\/vm\/drop_caches  #\u6e05\u7406\u76ee\u5f55\u9879\u548cinode\u7f13\u5b58\r\necho 3 &gt; \/proc\/sys\/vm\/drop_caches  #\u6e05\u7406\u9875\u9762\u3001\u76ee\u5f55\u9879\u548cinode\u7f13\u5b58\r\n<\/code><\/pre>\n<ol>\n<li>You can use the free command to check the system&#8217;s memory usage, including cache and buffer. Just input the following command in the terminal:<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code>free -h\r\n<\/code><\/pre>\n<ol>\n<li>Reboot system: If the above methods do not work, you can try restarting the system to free up cached memory.<\/li>\n<\/ol>\n<p>Please be aware that releasing cached memory may impact system performance, as caches can improve read and write speeds. These operations should only be performed when memory needs to be freed up.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>More tutorials<\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/how-to-check-if-an-array-is-not-empty-in-php\/\" target=\"_blank\" rel=\"noopener\">How to check if an array is not empty in PHP?<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/what-are-the-steps-for-configuring-environment-variables-in-centos-7\/\" target=\"_blank\" rel=\"noopener\">What are the steps for configuring environment variables in CentOS 7?<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/how-to-clear-the-cache-in-tomcat-with-spring-boot\/\" target=\"_blank\" rel=\"noopener\">How to clear the cache in Tomcat with Spring Boot?<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/how-to-clear-yum-cache-command-on-linux\/\" target=\"_blank\" rel=\"noopener\">How to clear yum cache command on Linux?<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/how-to-handle-a-large-number-of-concurrent-read-and-write-requests-in-cassandra\/\" target=\"_blank\" rel=\"noopener\">How to handle a large number of concurrent read and write requests in Cassandra?<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/how-to-implement-cache-expiration-mechanism-in-redis\/\" target=\"_blank\" rel=\"noopener\">How to implement cache expiration mechanism in Redis?<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/how-can-i-utilize-photorec-to-retrieve-erased-files\/\" target=\"_blank\" rel=\"noopener\">How can I utilize PhotoRec to retrieve erased files?<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/how-to-check-the-process-corresponding-to-a-port-number-in-linux\/\" target=\"_blank\" rel=\"noopener\">How to check the process corresponding to a port number in Linux?<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/convert-string-to-character-in-java\/\" target=\"_blank\" rel=\"noopener\">convert string to character array in Java.<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To release cache memory, you can use the following methods: To use the sync command: the sync command can write data from the cache to the hard drive and release the associated memory. Enter the following command in the terminal: sync \u4f7f\u7528echo\u547d\u4ee4\u6e05\u7406\u7f13\u5b58\uff1a\u53ef\u4ee5\u901a\u8fc7echo\u547d\u4ee4\u5411\/proc\/sys\/vm\/drop_caches\u6587\u4ef6\u4e2d\u5199\u5165\u6570\u503c\u6765\u6e05\u7406\u7f13\u5b58\u3002\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a echo 1 &gt; \/proc\/sys\/vm\/drop_caches #\u6e05\u7406\u9875\u9762\u7f13\u5b58 echo 2 &gt; \/proc\/sys\/vm\/drop_caches #\u6e05\u7406\u76ee\u5f55\u9879\u548cinode\u7f13\u5b58 echo 3 &gt; [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-2111","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to release cache memory in Linux? - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"To use the sync command: the sync command can write data from the cache to the hard drive and release the associated memory.\" \/>\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.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to release cache memory in Linux?\" \/>\n<meta property=\"og:description\" content=\"To use the sync command: the sync command can write data from the cache to the hard drive and release the associated memory.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/SiliCloudGlobal\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-12T09:15:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-03T16:12:48+00:00\" \/>\n<meta name=\"author\" content=\"Emily Johnson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SiliCloudGlobal\" \/>\n<meta name=\"twitter:site\" content=\"@SiliCloudGlobal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Emily Johnson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/\"},\"author\":{\"name\":\"Emily Johnson\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/3b041b19cffc258705478ecfab895378\"},\"headline\":\"How to release cache memory in Linux?\",\"datePublished\":\"2024-03-12T09:15:00+00:00\",\"dateModified\":\"2024-04-03T16:12:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/\"},\"wordCount\":278,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\"},\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/\",\"url\":\"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/\",\"name\":\"How to release cache memory in Linux? - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#website\"},\"datePublished\":\"2024-03-12T09:15:00+00:00\",\"dateModified\":\"2024-04-03T16:12:48+00:00\",\"description\":\"To use the sync command: the sync command can write data from the cache to the hard drive and release the associated memory.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.silicloud.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to release cache memory in Linux?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/blog\/\",\"name\":\"Silicon Cloud Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\",\"name\":\"Silicon Cloud Blog\",\"url\":\"https:\/\/www.silicloud.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png\",\"contentUrl\":\"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png\",\"width\":1024,\"height\":1024,\"caption\":\"Silicon Cloud Blog\"},\"image\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/SiliCloudGlobal\/\",\"https:\/\/twitter.com\/SiliCloudGlobal\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/3b041b19cffc258705478ecfab895378\",\"name\":\"Emily Johnson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a5cb4e73d02ab1d79f2dfe919389ff7c1de072baa97686392031c03d858cc358?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a5cb4e73d02ab1d79f2dfe919389ff7c1de072baa97686392031c03d858cc358?s=96&d=mm&r=g\",\"caption\":\"Emily Johnson\"},\"url\":\"https:\/\/www.silicloud.com\/blog\/author\/emilyjohnson\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to release cache memory in Linux? - Blog - Silicon Cloud","description":"To use the sync command: the sync command can write data from the cache to the hard drive and release the associated memory.","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.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/","og_locale":"en_US","og_type":"article","og_title":"How to release cache memory in Linux?","og_description":"To use the sync command: the sync command can write data from the cache to the hard drive and release the associated memory.","og_url":"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/","og_site_name":"Blog - Silicon Cloud","article_publisher":"https:\/\/www.facebook.com\/SiliCloudGlobal\/","article_published_time":"2024-03-12T09:15:00+00:00","article_modified_time":"2024-04-03T16:12:48+00:00","author":"Emily Johnson","twitter_card":"summary_large_image","twitter_creator":"@SiliCloudGlobal","twitter_site":"@SiliCloudGlobal","twitter_misc":{"Written by":"Emily Johnson","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/#article","isPartOf":{"@id":"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/"},"author":{"name":"Emily Johnson","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/3b041b19cffc258705478ecfab895378"},"headline":"How to release cache memory in Linux?","datePublished":"2024-03-12T09:15:00+00:00","dateModified":"2024-04-03T16:12:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/"},"wordCount":278,"commentCount":0,"publisher":{"@id":"https:\/\/www.silicloud.com\/blog\/#organization"},"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/","url":"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/","name":"How to release cache memory in Linux? - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/blog\/#website"},"datePublished":"2024-03-12T09:15:00+00:00","dateModified":"2024-04-03T16:12:48+00:00","description":"To use the sync command: the sync command can write data from the cache to the hard drive and release the associated memory.","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/blog\/how-to-release-cache-memory-in-linuxf\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.silicloud.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to release cache memory in Linux?"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/blog\/#website","url":"https:\/\/www.silicloud.com\/blog\/","name":"Silicon Cloud Blog","description":"","publisher":{"@id":"https:\/\/www.silicloud.com\/blog\/#organization"},"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.silicloud.com\/blog\/#organization","name":"Silicon Cloud Blog","url":"https:\/\/www.silicloud.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png","contentUrl":"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png","width":1024,"height":1024,"caption":"Silicon Cloud Blog"},"image":{"@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/SiliCloudGlobal\/","https:\/\/twitter.com\/SiliCloudGlobal"]},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/3b041b19cffc258705478ecfab895378","name":"Emily Johnson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a5cb4e73d02ab1d79f2dfe919389ff7c1de072baa97686392031c03d858cc358?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a5cb4e73d02ab1d79f2dfe919389ff7c1de072baa97686392031c03d858cc358?s=96&d=mm&r=g","caption":"Emily Johnson"},"url":"https:\/\/www.silicloud.com\/blog\/author\/emilyjohnson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts\/2111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/comments?post=2111"}],"version-history":[{"count":3,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts\/2111\/revisions"}],"predecessor-version":[{"id":72294,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts\/2111\/revisions\/72294"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/media?parent=2111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/categories?post=2111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/tags?post=2111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}