Sometimes when you open a lot of memory-intensive programs on the server, but after you close these programs, you find that the memory space is still the same as when the application is not closed, so that other applications open when the memory is not enough or very card, then you want to clean up the previous program when the memory occupied by the open. And most of the cache data is occupied, then how to clean up the memory? You can use the following steps to clean up your memory:
Most Linux servers have a caching mechanism enabled by default, and viewing the configuration file cat/proc/sys/vm/drop_caches of 0 means that the caching mechanism is turned on, which is very effective when running a service and facilitates fast reading of the service itself. Sometimes it is found that with the increase of the time of the site running, the memory consumption is increasing, so the system cache should be cleaned up and free of space in time.
1. View memory usage before cleanup
Free-m
2. Start cleaning up
echo 1 >/proc/sys/vm/drop_caches
3. View memory usage after cleanup
Free-m
The drop_caches in the above command means that the system cleans up the cache of the memory pages, resulting in more usable memory, and a description of the configuration and parameters of the Drop_caches file can be found in the following: Http://www.linuxinsight.com/proc_sys_ Vm_drop_caches.html
How to view and clean the system memory space under CentOS