In Linux, frequent File Access by clearing memory and Cache methods will cause a significant increase in the system Cache Usage $ free-m total used free shared buffers cached Mem: 3955 3926 28 0 55 3459-/+ buffers/cache: 411 3544 Swap: 5726 0 5726 free memory reduced to dozens of megabytes, slow system running sync writes dirty content back to hard disk $ sync clears free cache $ echo 3>/proc/sys/vm/drop_caches by modifying drop_caches of proc System: 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 shoshould run "sync" first in order to make sure allcached objects are freed. this tunable was Added in 2.6.16. modify/etc/sysctl. after the following option is added to the conf file, the vm will not be continuously added to the memory. dirty_ratio = 1 vm. dirty_background_ratio = 1 vm. dirty_writeback_centisecs = 2 vm. dirty_expire_centisecs = 3 vm. drop_caches = 3 vm. swappiness = 100 vm. vfs_cache_pressure = 163 vm. overcommit_memory = 2 vm. lowmem_reserve_ratio = 32 32 8 kern. maxvnodes = 3 the above settings are rough, so that the role of the cache is basically not available. Need to make appropriate adjustments based on machine conditions to find the best compromise source http://blog.lishixin.net/linux/1222.html