遇到问题:
使用 vdbench 压测 ceph 目录,期间会进行海量小文件的创建,当达到10亿+数量时,集群出现警告1 MDSs report oversized cache
其实根据字面意思不难看出,是因为 mds 内存不够导致
解决方法
查看一下当前mds内存限制mds_cache_memory_limit
是4G
,报警阈值mds_health_cache_threshold
为 1.5(即达到 1.5 倍时产生告警)
[root@node1 ~]# ceph daemon mds.node1 config show | grep mds_cache
"mds_cache_memory_limit": "4294967296",
"mds_cache_mid": "0.700000",
"mds_cache_reservation": "0.050000",
"mds_cache_size": "0",
"mds_cache_trim_decay_rate": "1.000000",
"mds_cache_trim_interval": "1",
"mds_cache_trim_threshold": "65536",
[root@node1 ~]# ceph daemon mds.node1 config show | grep mds_health
"mds_health_cache_threshold": "1.500000",
"mds_health_summarize_threshold": "10",
修改mds_cache_memory_limit
为10G
//方法一:
[root@node1 ~]# ceph daemon mds.node1 config set mds_cache_memory_limit 10737418240
{
"success": "mds_cache_memory_limit = '10737418240' "
}
//方法二
[root@node1 ~]# vim /etc/ceph/ceph.conf
[global]
mds cache memory limit = 10737418240
再观察集群状态 HEALTH_OK
√
补充:
[root@node1 ~]# ceph daemonperf mds.node1
---------------mds---------------- --mds_cache--- ------mds_log------ -mds_mem- ----mds_server----- mds_ -----objecter------ purg
req rlat fwd inos caps exi imi |stry recy recd|subm evts segs repl|ino dn |hcr hcs hsr cre |sess|actv rd wr rdwr|purg|
0 0 0 2.4M 2.4M 0 0 | 0 0 0 |657 322k 438 0 |2.4M 2.4M| 0 0 0 0 | 1 | 0 0 0 0 | 0
5.3k 2 0 2.4M 2.4M 0 0 | 0 0 0 |7.5k 329k 448 0 |2.4M 2.4M|5.3k 0 0 0 | 1 | 0 10 93 0 | 0
7.1k 1 0 2.4M 2.4M 0 0 | 0 0 0 |7.2k 336k 461 0 |2.4M 2.4M|7.1k 0 0 0 | 1 | 0 14 173 0 | 0
4.4k 1 0 2.4M 2.4M 0 0 | 0 0 0 |4.4k 341k 467 0 |2.4M 2.4M|4.4k 0 0 0 | 1 | 0 8 48 0 | 0
1.1k 1 0 2.4M 2.4M 0 0 | 0 0 0 |1.1k 342k 470 0 |2.4M 2.4M|1.1k 0 0 0 | 1 | 0 2 24 0 | 0
标签:memory,cache,ceph,mds,node1,MDSs,2.4
From: https://www.cnblogs.com/itsfei/p/17502981.html