- 论坛徽章:
- 0
|
回复 1# zxe
you don't need to, just treat buffer&cache as free memory.
however you can reduce inode&dentry cache a bit with vfs_cache_pressure
http://honglus.blogspot.com/2010 ... x-memory-cache.html
#Tune vfs_cache_pressure
If dentry cache or inode cache use too much memory, if it is not application abnormal behaviour to read/write large number of files. You can suppress dentry cache or inode cache memory usage by raising vm.vfs_cache_pressure to higher value e.g 500 or 1000
vfs_cache_pressure
Controls the tendency of the kernel to reclaim the memory which is used for
caching of directory and inode objects.
At the default value of vfs_cache_pressure=100 the kernel will attempt to
reclaim dentries and inodes at a "fair" rate with respect to pagecache and
swapcache reclaim. Decreasing vfs_cache_pressure causes the kernel to prefer to retain dentry and inode caches. When vfs_cache_pressure=0, the kernel will never reclaim dentries and inodes due to memory pressure and this can easily
lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100
causes the kernel to prefer to reclaim dentries and inodes |
|