Redhat – OOM-Killer, jboss and kernel panic

32-bitjbossoomredhatvmware-esx

We are running RedHat 3.4.6(x32) on VMWareEsx3.5(x64) with 6GB RAM.
A few java processes(including jboss) are running in the background.

The problem is that the java processes consume lots of memory, and sometimes they are killed by the OOM-killer.
When OOM-killer is about to act, the free physical memory is very low 100MB-200MB, but the swap is not used (99% free).
Sometimes this causes a kernel panic too.

  • So why isn't the swap used?
  • How to investigate this kernel panic?
  • Is using 6GB memory on 32bit Redhat wise?

Thanks

Best Answer

Personally I would never use PAE (over 4G of RAM on a 32-bit system). You'll get much better mileage running an actual 64-bit kernel and system.

OOM should only trigger when a malloc might fail. (not when you have lots of swap available)

The 32-bit kernel is likely to be part of the cause. PAE uses different memory zones and it may be that one zone isn't allowed to malloc from another.

Have you modified your swappiness? (How readily the kernel will use swap.) cat /proc/sys/vm/swappiness ?

You might also investigate tuning vm.dirty_ratio or vm.lower_zone_protection = 100.

Have you captured the kernel panic? (a serial console is often a good way to do this)

You can also try to preempt the OOM-Killer with your own process monitoring software. (take a look at Monit)

Best of luck