I have a problem with a java application. Using a 64bit JVM (1.60.0_20) under windows server 2008 r2 (64bit), the application hangs at 2GB allocated memory, it will not go beyond that mark even after changing the JVM settings to allocate more (-Xmx5000m); this is on an EC2 instance with 7.5GB available memory.
+1
A:
Hangs? Not throws 'OutOfMemoryError'? What happens if you start out with the heap at 2GB ("-Xms2g -Xmx2g"), can you start the app?
I wonder if you are running up against the memory available to your instance. Is it a small instance? It will start thrashing, due to swap, as the amount of memory in use well exceeds the physical memory available. Maybe you need a large-memory instance instead.
Sean Owen
2010-05-24 15:00:06
Well I haven't tried the 2G,2G configuration, I do have a high memory instance with about 4G Ram still available. It does not throw an exception of any sort. It just sits there staring into my face, lifeless and motionless! Does it have to do anything with the GC??
Wajih
2010-05-24 15:26:11
My theory is that the app is actively using more memory than there is physical memory. This means the machine is swapping/paging memory pages to disk constantly, which slows things down so much it may look stuck. I am not sure how to verify this on Windows -- is this in the Task Manager / Performance? Commit charge?It's also possible this is a red herring and there is some app problem that's causing deadlock.
Sean Owen
2010-05-24 16:25:34
Well thanks for the reply, but turned out to be something more serious. Looks like the thread pooler has a problem. My app. was a threaded application and it would hang because thread pool executor would not assign new threads.
Wajih
2010-05-26 07:40:44