When I use the default settings:
vm.overcommit_memory = 0
vm.overcommit_ratio = 50
I can read these values from /proc/meminfo
file:
CommitLimit: 2609604 kB
Committed_AS: 1579976 kB
But when I change vm.overcommit_memory
from 0
to 2
, I'm unable to start the same set of applications that I could start before the change, especially amarok. I had to change vm.overcommit_ratio
to 300
, so the limit could be increased. Now when I start amarok, /proc/meminfo
shows the following:
CommitLimit: 5171884 kB
Committed_AS: 3929668 kB
This machine has only 1GiB of RAM, but amarok works without problems when vm.overcommit_memory
is set to 0. But in the case of setting it to 2
, amarok needs to allocate over 2GiB of memory. Is it a normal behavior? If so, could anyone explain why, for instance, firefox (which consumes 4-6x more memory than amarok) works in the same way before and after the change?