Feed Rss


04.22.2013, Linux, by .


$ free –m

total used free shared buffers cached

Mem: 3955 3926 28 0 55 3459

-/+ buffers/cache: 411 3544

Swap: 5726 0 5726





$echo 3 > /proc/sys/vm/drop_caches


Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.

To free pagecache:

* echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes:

* echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes:

* echo 3 > /proc/sys/vm/drop_caches

As this is a non-destructive operation, and dirty objects are notfreeable, the user should run “sync” first in order to make sure allcached objects are freed.

This tunable was added in 2.6.16.

修改/etc/sysctl.conf 添加如下选项后就不会内存持续增加

vm.dirty_ratio = 1





vm.swappiness =100



vm.lowmem_reserve_ratio=32 32 8



【收录】Linux下清理内存和Cache方法 有 262 条回应

  1. It’s going to be ending of mine day, except before finish I am reading this great piece of writing to improve my experience.| а

  2. I’m extremely impressed with your writing skills and also with the structure to your weblog. Is that this a paid theme or did you customize it your self? Anyway stay up the nice high quality writing, it is rare to see a great weblog like this one nowadays..| а

  3. naturally like your web site however you have to take a look at the spelling on several of your posts. A number of them are rife with spelling problems and I to find it very troublesome to tell the reality on the other hand I will surely come again again.| а

  4. I am sure this paragraph has touched all the internet visitors, its really really fastidious paragraph on building up new weblog.| а

  5. Hi mates, its impressive paragraph concerning cultureand entirely explained, keep it up all the time.| а

  6. Painter And Decorator Gloucester
    38 Bruton Way
    Gloucester GL1 1DA, United Kingdom
    01452 223268

  7. That is really fascinating, You are an excessively professional blogger. I have joined your rss feed and sit up for in the hunt for more of your magnificent post. Additionally, I have shared your web site in my social networks| а

  8. I simply want to mention I am just very new to weblog and actually savored your web page. Most likely I’m want to bookmark your site . You absolutely have perfect writings. Cheers for sharing with us your web-site.

  9. A fascinating discussion is definitely worth comment. I believe that you should publish more on this topic, it may not be a taboo matter but generally people do not speak about such subjects. To the next! All the best!!| а

  10. I’m really impressed with your writing talents as smartly as with the layout on your blog. Is this a paid subject or did you modify it your self? Anyway keep up the nice high quality writing, it is uncommon to see a great weblog like this one these days..| а

  11. I just want to say I am just newbie to blogs and honestly liked this web site. Very likely I’m going to bookmark your site . You certainly come with beneficial article content. Thank you for sharing with us your webpage.

  12. Greetings! I know this is somewhat off topic but I was wondering which blog platform are you using for this website? I’m getting sick and tired of WordPress because I’ve had problems with hackers and I’m looking at options for another platform. I would be fantastic if you could point me in the direction of a good platform.| а



电子邮件地址不会被公开。 必填项已用*标注