This discussion is archived
1 Reply Latest reply: Jan 17, 2013 2:51 AM by 898076 RSS

Most of heap space never used, but app gets very slow, almost halted

898076 Newbie
Currently Being Moderated
Hi. I run a Java program that needs tens of GB of memory. The computer has 64GB of memory. I run java with -Xmx48GB.

The process runs as follows (a screenshot from jvisualvm: http://s13.postimage.org/g8alcbcnr/heap.png)

Note: is is a 24-core system, so a single thread has at most about 4% cpu.

1. About a dozen GCs occurs, where heap used (as reported by jvisualvm) increases slowly to 6GB. Total heap size (again, reported by jvisualvm) is 16GB.
2. About five minutes of a slown down to almost halt (usable threads). Linux' "top" reports 100% CPU however. Jvisualvm shows about 0% CPU, 0% GC.
3. Again, the app runs, about 20 GCs occurs, where heap used slowly increases to 12GB. Total heap size is 28GB.
4. The app almost halts again like in (2), this time however it is so until at least half an hour, possibly longer, as I terminated the process.
Heap used is almost constantly 12 GB, very, very slowly rising. Total heap size is 28GB, most of it seemingly unused. Free system memory, as reported by
"top", is still >10GB. "Top" shows 100% cpu usage, jvisualvm disagrees, showing some "sawtooth" wave this time

So, it seems that despite -Xmx48GB and still free system memory, usable heap space is at most about 12GB. Why? Can it be a problem with the app?
(it is a single threaded pure numerical application, jvisualvm's CPU monitor seems to convey, that the app runs as usual, albeit very slowly). Or is it related
to some JVM problem? "Top" shows, that the process is doing something, while it is not. Can it be, memory access gets very slow around 12GB?

Edit: memory sampler shows: Classes: 784 Instances: 248,501,426 Bytes: 12,973,832,912

Edited by: 895073 on Jan 16, 2013 10:05 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points