体检示例
体检示例
MEMORY DOCTOR
# 例:Hi Sam, this instance is empty or is using very little memory...
# 例:This instance has a peak of X GB and is currently using Y...
# 例:This instance has memory fragmentation ratio 1.7...
INFO memory | grep -E 'mem_fragmentation_ratio|mem_fragmentation_bytes|allocator_frag_ratio'| 碎片率 | mem_fragmentation_ratio = RSS / used_memory |
|---|---|
| 健康区间 | 约 1.0-1.5(跨版本有差异) |
| 高碎片 | >1.5 考虑 activedefrag 或重启迁移 |
DOCTOR 只是线索:碎片率高低还要结合 maxmemory 与业务波动判断,别按一句诊断就重启实例。