1. Querying current memory usage and releasing cached parameters
Redismaster 10:29:24 [~] [root] free-m
Total used free shared buffers Cached
mem:7872 777 7095 0 117 435
-/+ buffers/cache:223 7648
swap:16383 0 16383
View the commands that release the cache parameters as follows:
Redismaster 10:29:27 [~] [root] cat/proc/sys/vm/drop_caches
0
2. Use the sync command to write dirty data from the system cache to disk, including modified I-node, deferred block I/O, and read-write mapping files, command
Redismaster 10:30:12 [~] [root] sync
3. The parameters of cache release are recorded in the configuration file/proc/sys/vm/drop_caches, and the command
Redismaster 10:30:44 [~] [root] echo 3 >/proc/sys/vm/drop_caches
4, do not restart the machine to change the configuration to take effect, command
Redismaster 10:32:20 [~] [root] sysctl-p
CentOS 6.5 x86_64 system manually frees memory