This is the default. vm.overcommit is set to 0 (not 2): with this, the kernel effectively calculates the total (over)committed memory size as follows:
Total available memory = (RAM + swap) * (overcommit_ratio + 100)%;
This formula only applies when vm.overcommit == 0.
On our Fedora 31 VM, with vm.overcommit == 0 and 2 GB each of RAM and swap, this formula yields the following (in gigabytes):
Total available memory = (2 + 2) * (50+100)% = 4 * 150% = 6 GB
So the system effectively pretends that there is a grand total of 6 GB of memory available. So now we understand: when our oom_killer_try process allocated huge amounts of memory and this limit (6 GB) was exceeded, the OOM killer jumped in!
We now understand that the kernel provides several VM overcommit tunables under /proc/sys/vm, allowing the system administrator (or root) to...