There is a Linux instance running Jenkins (Amazon Linux Linux ip-xxx 4.9.20-11.31.amzn1.x86_64#1
).Jenkins jobs running here often fail due to lack of memory.
Looking at things like free
and /proc/meminfo
, the slab seems to be consuming most of the memory.
[root@ip-xxx~]#free-tm
total used free shared buffers cached
Mem: 7985 7205 7790 19310
-/+ buffers/cache: 6876 1108
Swap: 0 0 0 0 0 0 0 0 0 0 0 00
Total: 7985 7205779
[root@ip-xxx~]#cat/proc/meminfo | grep "Slab\|claim"
Slab: 6719244 kB
SReclaimable—34288 kB
Sunreclaim: 6684956kB
echo3>/proc/sys/vm/drop_caches
to find out how to release entry
from the slab, but what should I do with kmalloc-256
, which has a lot of memory, or what process holds kmalloc-256
?
[root@ip-xxx~]#slabtop-o|head-n15
Active/Total Objects (%used): 26805556/26816810 (100.0%)
Active/Total Slabs (%used): 837451/837451 (100.0%)
Active/Total Caches (%used): 85/111 (76.6%)
Active/Total Size (%used): 6696903.08K / 6701323.05K (99.9%)
Minimum/Average/Maximum Object: 0.01K/0.25K/8.00K
OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME
26658528 266582899% 0.25K 833079 32 6664632K kmalloc-256
21624 21009997% 0.12K 63634 2544K kernfs_node_cache
20055 20055 100% 0.19K 955 213820K dentry
10854 10646 98% 0.58K 402 27 6432K inode_cache
10624 9745 91% 0.03K 83 128 332K kmalloc-32
7395 7395 100% 0.05K 8785 348K ftrace_event_field
6912 6384 92% 0.02K 27 256 108K kmalloc-16
6321 5581 88% 0.19K 301 21 1204K credit_jar
"Checked the causes and countermeasures of the server's memory being squeezed little by little" article for your reference.
© 2024 OneMinuteCode. All rights reserved.