linux パフォーマンスチューニング

このエントリーをはてなブックマークに追加
319login:Penguin
linuxは空きメモリはディスクキャッシュに有効活用すると聞きますが、どんどん勝手に解放されてしまいます。

でかいファイルを読むと、直後は確かにfreeが減ってcachedが増えているのですが、
みるみるうちに、cachedが減っていきその分freeが増えていきます。

sysctlか/procか何かの設定で改善できないでしょうか。2.6.9です。
320login:Penguin:2009/07/15(水) 01:48:37 ID:2C0YOuic
psでみた時の各プロセスの仮想メモリ使用状況は?
プロセスが落ちていくなら、どんどん解放されるんじゃないのかな。
321login:Penguin:2009/07/15(水) 05:22:39 ID:gaAhOfwD
>>319
vm.vfs_cache_pressureを調整してみ。

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. Increasing vfs_cache_pressure beyond 100
causes the kernel to prefer to reclaim dentries and inodes.