| 参数 | vm.overcommit_ratio |
|---|---|
| 默认值 | 50(百分比) |
| 公式 | CommitLimit = swap 总量 + 物理内存 × ratio% |
核算余量
核算余量
grep -E 'CommitLimit|Committed_AS' /proc/meminfo
sysctl vm.overcommit_ratio vm.overcommit_memory提高 ratio 会放宽严格模式的准入;改前用 Committed_AS/CommitLimit 计算现有余量。
严格超售模式下 CommitLimit 的构成比例(默认 50):CommitLimit = swap + 物理内存 × ratio%;仅在 overcommit_memory=2 时生效。
| 参数 | vm.overcommit_ratio |
|---|---|
| 默认值 | 50(百分比) |
| 公式 | CommitLimit = swap 总量 + 物理内存 × ratio% |
grep -E 'CommitLimit|Committed_AS' /proc/meminfo
sysctl vm.overcommit_ratio vm.overcommit_memory