小编pgy*_*esh的帖子

overcommit_memory 和 overcommit_ratio

这是我当前的设置:

vm.overcommit_ratio = 50 (default)
vm.overcommit_memory = 2
Run Code Online (Sandbox Code Playgroud)

和当前内存使用情况:

[localhost~]$ free -g
             total       used       free     shared    buffers     cached
Mem:            47         46          0          0          0         45
-/+ buffers/cache:          1         45
Swap:           47          0         47
Run Code Online (Sandbox Code Playgroud)

根据文档我的理解是:

vm.overcommit_memory = 2不允许过度使用内存超过 RAM 的 50% (as vm.overcommit_ratio is 50),但我仍然可以看到当前内存使用量为 47 GB 中的 46 GB。

我是不是误会了什么?

linux kernel memory virtual-memory

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

kernel ×1

linux ×1

memory ×1

virtual-memory ×1