There is a overcomit configuration in Linux, which is related to the performance of the system (heuristic allow, no check, or block) when the process is requesting memory resources too much.
/proc/sys/vm/overcommit_memory This file contains the kernelVirtualmemory Accounting mode. Values are:0: Heuristic Overcommit ( This isThedefault) 1: Always overcommit, never check2: Always check, never overcommit in mode0, calls of Mmap (2) with Map_noreserve is notchecked, and thedefaultCheck isvery weak, leading to the risk of getting a process"oom-killed". In mode2(Available since Linux2.6), the totalVirtualaddress space that can be allocated (Commitlimitinch/proc/mem‐info) isCalculated asCommitlimit= (total_ram-total_huge_tlb) *Overcommit_ratio/ -+ Total_swap
A detailed understanding can be found in this blog: http://linuxperf.com/?p=102
In the actual project, if the machine is running Redis, the general will turn Overcomit into 1 (https://redis.io/topics/faq# Background-saving-fails-with-a-fork-error-under-linux-even-if-i-have-a-lot-of-free-ram)
1 >/proc/sys/vm/overcommit_memory:)
When running FFMEPG, it will also be set to 1. Avoid FFMEPG some processes have an internal error while requesting memory.
The root cause is that the process has requested so much memory that it does not necessarily occupy so much memory, and that the allocation of physical RAM pages takes place in the moment of use, not at the moment of application. So we can allow the system to overcommit, meet the process request, can be cgroup memory to limit the user to use the upper limit.
Linux Overcommit Flag