RHEL4 virtual machines running Oracle/Java randomly kill processes by OOM killer (1002704)
- OOM killer kills applications even though ESX is not under memory load.
- The command top shows a lot of memory is being cached and swap is hardly being used.
When the size of the data to be copied exceeds the size of physical memory, oom-killer starts randomly killing processes.
This can be fixed by running:
sysctl -w vm.lower_zone_protection 100
When lower_zone_protection is set to 100, it increases the free page threshold by 100, thereby starting page reclamation earlier and preventing NFS (Network File System) from getting far behind the kernel's memory demands. This causes page reclamation to happen sooner, thus providing more 'protection' for the zones.