This is on Centos 5, Linux 126.96.36.199-xenU #1 SMP Wed May 5 00:49:22 UTC 2010 i686 i686 i386 GNU/Linux
I have a java server process which I normally run with the following configuration
-Xmx700m -Xms500m -XX:PermSize=128m -noclassgc
And it runs like a champ. But over time, as my application data grows, that won't be enough for normal operations.
Recently, I added more memory to my VPS, and I tried to extend the memory:
-Xmx1024m -Xms1024m -XX:PermSize=256m -noclassgc
And what happens is that as it boots the application, it eats up all the "low memory" and my application crashes (and there's often a stack trace message from the kernel, but not a panic or bug)
And at that point, I'm toast - the defunct process seems to own all the low memory, and oom-killer starts killing everything. I have to reboot to fix it.
But when I go back to 700 meg, it runs like a champ again, and doesn't use much "low memory" at all - (i mean, there's about 690 meg of low memory allocated, and only about 140 meg is used)
$ free -lm total used free shared buffers cached Mem: 2700 1334 1365 0 100 274 Low: 689 140 548 High: 2011 1194 816 -/+ buffers/cache: 959 1740 Swap: 714 0 714
Java is 1.6:
java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)
Does anyone know why this is happening? I'm planning on upgrading java, but if there's another known issue for this scenario, I'd love to hear it. Changing out the kernel may be problematic, but if there are any server-local configuration changes I could make to use high memory instead of low memory.