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

Re: eXist forcing full GC before heap full?

by Wolfgang Meier-2 :: 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.

I thought I removed the call to System.gc, but obviously I did not. Or
did I reintroduce it? I forgot, sorry. Normally you would expect Java to
trigger a major gc before it runs out of memory, so the call should not
be required. But you never know.

Well, I would suggest to comment out the call to System.gc and see if
the system runs stable or not. If yes, we should consider removing it in
trunk as well.

The checkAvailableMemory is called because eXist will use the entire
free memory to buffer index entries before it flushes them to the actual
index. This is not affected by the cacheSize setting in conf.xml (or at
least only indirectly). The cacheSize setting controls how much
*permanent* cache space will be used, while the indexing process may use
additional memory if available.

> Is this an indication that I need to increase the cacheSize setting (which I
> still have at 48 MB)?

No, though 48M cacheSize is really small if you need to store larger
documents. I would recommend to carefully increase cacheSize to 128M or
so (but always less than 1/3 of the main memory).

Wolfgang

------------------------------------------------------------------------------
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

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