Suppose if you have a large partition (1Tb or higher), for example /home, which is almost full. This means that there are a lot of user’s files on it, and when some software like backup scans all these files, Slab cache starts to grow. Here is an example of /proc/meminfo:

Example:
# cat /proc/meminfo

Slab shows over 100Gb !

In this case, the overall server performance could decrease, especially when some heavy IO software is running.

There are a few settings to control the Slab cache size.

First, we recommend to set vm.vfs_cache_min_ratio to 0.

Second, parameter is vm.vfs_cache_pressure, the default value is 100.

Basically, this parameter controls how aggressively the kernel will try to shrink the dentry/inode cache, so setting it to a bigger value could help to reduce the Slab cache size. The value can be set to 500 or even 1000.

Note:

Setting vm.vfs_cache_min_ratio to 0 on the kernel version prior to 3.10.0-614.10.2.lve1.4.46 will crash it. So, you can safely set vm.vfs_cache_min_ratio to 0 if your server is running the kernel 3.10.0-614.10.2.lve1.4.46 or higher.

 

آیا این پاسخ به شما کمک کرد؟ 1 کاربر این را مفید یافتند (1 نظرات)