In the production process, some Java modules will be more cruel to eat the system memory, and if the module is written less, the resulting garbage will be more, if the Linux system memory release will not be timely, and then the vicious circle, and finally the process card to die, but the server is not down machine, So this time we need to transport out, manually release the memory.
First, we log on to a server,#free-M to see the current situation:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8B/DC/wKioL1hbTGqiHOMFAAAlZBSGIcU923.png "title=" 1.png " alt= "Wkiol1hbtgqihomfaaalzbsgicu923.png"/>
Then #cat/proc/sys/vm/drop_caches, you will see that the value inside is 0,0 is not released.
#sync, the dirty data in the system cache is written to disk, including modified I-node, deferred block I/O, and read-write mapping files.
# echo 3 >/proc/sys/vm/drop_caches
#sysctl-P, which can take effect without restarting the server. After the following series of text appears, #free-M look at:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8B/DC/wKioL1hbTeLSLD8xAADa8uf_SNE346.png "title=" 1.png " alt= "Wkiol1hbtelsld8xaada8uf_sne346.png"/>
Released from 112 to 2790, visible results are immediate.
This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1885022
How do I manually release Linux memory?