« Return to Thread: eXist forcing full GC before heap full?

eXist forcing full GC before heap full?

by Alessandro Vernet :: Rate this Message:

Reply to Author | View in Thread

I am importing a very large XML document, and have set the VM to -Xms and -Xmx to 1 GB. Running the VM with -verbosegc, I notice that VM is doing repetitive garbage collections when the heap reaches 800 MB, 200 MB short of the 1 GB I set. Surprised by this behavior, I did a few thread dumps while the import was running, and it seems that those full GCs are forced by eXist:

"http-8080-Processor23" daemon prio=5 tid=0x00235910 nid=0x845e00 runnable [0xb20b2000..0xb20b2d90]
        at java.lang.Runtime.gc(Native Method)
        at java.lang.System.gc(System.java:891)
        at org.exist.storage.NativeBroker.checkAvailableMemory(NativeBroker.java:2932)
        at org.exist.storage.NativeBroker.storeNode(NativeBroker.java:2381)
        at org.exist.storage.DBBroker.storeNode(DBBroker.java:503)

Is this an indication that I need to increase the cacheSize setting (which I still have at 48 MB)? Can increasing it too much lead to out of memory errors? Since eXist is forcing a full GC short of 200 MB before reaching the 1 GB max heap size, should I consider increasing cacheSize by close to 200 MB (say 150 MB, to be on the safe side)?

Ideally, I'd like eXist to automagically use as much memory as possible for the cache, up to the max heap size, and free some of the memory used by the cache on full garbage collection (sort of what weak references are promised to offer). But maybe this isn't realistic?

Alex
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet

 « Return to Thread: eXist forcing full GC before heap full?