Clean up the cache in linux to release the memory system environment: CentOS5.4x64www.2cto.com check the machine used for development Today. the memory usage is 11 GB, and most departments are cached, calculation method based on linux memory usage: available memory free + buffers + cached, so... in linux, the cache is cleared to release the memory system environment: Cent OS 5.4x64 www.2cto.com. today, check the machine used for development. the memory usage is 11 GB, and most departments are cached, according to the computing method available in linux Memory: available memory = free + buffers + cached, the available memory of this server is about 10.7 GB. swap occupies a very small amount, which indicates that the physical memory is sufficient at present, after reading the online introduction, clear the cache. The effect is immediate. you can perform the following operations: 1. current memory usage: free total used free shared buffers cachedMem: 12296092 11812364 48 3728 0 390868 10336804-/+ buffers/cache: 1084692 11211400 Swap: 8385920 164 8385756 www.2cto.com 2, sync (be sure to run this command before the third part) 3. echo 3>/proc/sys/vm/drop_caches 4. View memory usage: free total used free shared buffers cachedMem: 12296092 890740 11405352 0 3012-/+ buffers/cache: 131116 756612 Swap: 8385920 164 8385756 5, echo 0>/proc/sys/vm/drop_caches do not know whether there is any exception. according to the introduction, it should be a common method to release the cache, however, we recommend that you do not use it frequently. if If swap is not used in many cases, no operation can be performed to ensure stable system operation. When swap is used, consider analyzing programs or increasing the physical memory.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service