Recently encountered a strange phenomenon on the line, Redis in the RDB persistence, the background exposed can not allocat memory error
Specific errors See error analysis in the Redis module
Here are the main instructions for fork (), and the copy-on-write operation
The Linux kernel adds copy-on-write to the fork operation after 2.6 to improve system reliability and performance
The first explanation is fork (), just a confirmation of the resource (here is determined by the Vm.overcommit parameter),
Many of the online overcommit parameters are said to be misunderstanding
In simple terms,
0-System default, the application is relatively safe and reasonable, is the current free memory and swap and the amount of memory required to do the comparison
1-relatively idealized, not suitable for production processes, regardless of request memory, direct release
2-factor configurable, can limit the amount of memory used for the system of how much, convenient configuration
The above confirmation determines whether fork can continue to go down
However, the actual memory resource request occurs at write time, and the master and child processes are shared by the memory resources.
If the main process simultaneously operates a write operation of memory, then the child process requests the same size memory area, and the resource occupies until the end.
Linux kernel parsing process fork operation