linux内存UB,linux - kmalloc-256似乎占用了大部分内存资源。 我怎么能解脱这个? - 堆栈内存溢出...

我有一个运行Jenkins的Linux实例(Amazon Linux Linux ip-xxx 4.9.20-11.31.amzn1.x86_64 #1 )。 由于缺少工作所需的内存,它偶尔会停止工作。

基于我对free命令和/proc/meminfo ,似乎Slab占用了实例上可用的大部分内存。

[root@ip-xxx ~]# free -tm

total used free shared buffers cached

Mem: 7985 7205 779 0 19 310

-/+ buffers/cache: 6876 1108

Swap: 0 0 0

Total: 7985 7205 779

[root@ip-xxx ~]# cat /proc/meminfo | grep "Slab\|claim"

Slab: 6719244 kB

SReclaimable: 34288 kB

SUnreclaim: 6684956 kB

我可以通过运行echo 3 > /proc/sys/vm/drop_caches找到清除dentry缓存的方法,但是如何清除kmalloc-256 ? 或者,有没有办法找到哪个进程使用kmalloc-256内存空间?

[root@ip-xxx ~]# slabtop -o | head -n 15

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 26658288 99% 0.25K 833079 32 6664632K kmalloc-256

21624 21009 97% 0.12K 636 34 2544K kernfs_node_cache

20055 20055 100% 0.19K 955 21 3820K 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 87 85 348K ftrace_event_field

6912 6384 92% 0.02K 27 256 108K kmalloc-16

6321 5581 88% 0.19K 301 21 1204K cred_jar

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值