n this article, we will see how to solve CloudLinux Slab cache grows and overall server performance is bad issue.
This solution will work if your server is running the kernel 3.10.0-614.10.2.lve1.4.46 or higher.
If you have a large partition, for example /home and it’s almost full because of lot’s of user’s files on it. When some application like backup, scans all these files, automatically Slab cache starts to grow.
To verify/check Slab size, use following command:
Run this command with root access
# cat /proc/meminfo | grep Slab:
You may see result like:
Slab: 120366508 kB
Note: in you case, size may different.
This could decrease overall server performance when some heavy IO applications are running.
To resolve, there are few configurations to control the Slab cache size.
1. Set following value
vm.vfs_cache_min_ratio to 0
This means that, it can not be reclaimed and the parameter controls the minimum amount (in percentage) of dentry/inode cache. The default value is 2, which is rather small, but with a lot of cgroups used in the system, this two percents can be a very big value.
2. Set following value
vm.vfs_cache_pressure to 500 or 1000
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.
In this article, we have seen how our support engineer CloudLinux Slab cache grows and overall server performance is bad issue.
[Need assistance to fix this error or install tools? We’ll help you.]