I wasn't aware of that, but Julia Evans has collected some info on the topic.
I have to admit I'm only vaguely informed of advanced cgroups features, as my personal Linux systems usually don't have that feature compiled in, and they haven't been getting in my way on Debian distribution kernels either (where I mostly ignore them).
Julia Evans wrote:
swap + cgroup memory limits = a little surprising
My model of memory limits on cgroups was always “if you use more than X memory, you will get killed right away”. It turns out that that assumptions was wrong! If you use more than X memory, you can still use swap!
And apparently some kernels also support setting separate swap limits. So you could set your memory limit to X and your swap limit to 0, which would give you more predictable behavior.
My model of memory limits on cgroups was always “if you use more than X memory, you will get killed right away”. It turns out that that assumptions was wrong! If you use more than X memory, you can still use swap!
And apparently some kernels also support setting separate swap limits. So you could set your memory limit to X and your swap limit to 0, which would give you more predictable behavior.
I have to admit I'm only vaguely informed of advanced cgroups features, as my personal Linux systems usually don't have that feature compiled in, and they haven't been getting in my way on Debian distribution kernels either (where I mostly ignore them).