OOM is short form for Out of memory. As name suggest it kills process randomly when the size of the data to be copied exceeds the size of physical memory i.e. when out of memory situation occurs OOM kills the lower priority process and frees the memory.
It is the job of the linux ‘oom killer’ to sacrifice one or more processes in order to free up memory for the system when all else fails.
Recently I fixed NFS related problem by setting vm.lower_zone_protection to 150 via sysctl facility. A reasonable value for lower_zone_protection is 150. But what is 150? It is 150 MB (approximately).
The lower_zone_protection tunable determines how aggressive the kernel is
in defending these lower zones. In simple words Ã¢â‚¬â€œ I am preventing NFS eating up all memory and keeping my system stable. Remember 150MB will be reserved and not allocated to any one including applications, users, and cache.
Open your /etc/sysctl.conf and add following line (thanks to Alexander N. Spitzer for solution/hint):
# vi /etc/sysctl.conf
Append followin line:
vm.lower_zone_protection = 150
Save the change and reboot system. Mount NFS share and it will now able to create large file.
On the other hand, you can type the following command at shell prompt:
# echo 150 > /proc/sys/vm/lower_zone_protection