Linux slabtop command-display kernel slice cache information

The Linux kernel needs to allocate memory for temporary objects such as tasks or device structures and nodes, and the cache allocator manages the cache of these types of objects. Modern Linux kernels deploy this cache allocator to hold caches, called slices. Different types of slice buffers are maintained by slice distributors.
The purpose of the slabtop command is to display real-time kernel slice cache information.
The slabtop command can only be used in Linux kernels higher than 2.4. You must have root authority to use this command.

Problem scene

deal with

#第一步 查看并记录min_free_kbytes参数的值

cat /proc/sys/vm/min_free_kbytes  

#第二步 释放drop_caches内存

sync
echo 1 > /proc/sys/vm/vfs_cache_pressure
echo 2 > /proc/sys/vm/drop_caches
echo 100 > /proc/sys/vm/vfs_cache_pressure

# 第三步  调整虚拟内存回收

echo 8192000 > /proc/sys/vm/min_free_kbytes

Guess you like

Origin www.cnblogs.com/du-z/p/12707492.html