Database Reference
In-Depth Information
Figure 15-6. How eXist's caches take from memory available to eXist
The collections cache should be large enough to keep the metadata
of frequently queried collections in memory. The default cache set‐
tings in eXist are far too conservative for all but local development
with small datasets. To determine if increasing the collections
cache size will make a difference for you, you can record the time it
takes to execute the simple query collection("/db")/ someRootE
lem before and after changing the size. Remember that you must
restart eXist after changing any memory or cache settings in order
for them to take effect!
A common warning sign that a cache in eXist has become too small (due to more
intensive querying or storing and querying a larger dataset) is a sudden drop in query
performance and/or a noticeable increase in disk I/O when you're uploading large
sets of documents into the database. This is caused by cache thrashing; increasing the
memory available to the Cache Manager and restarting eXist may resolve the issue.
When testing query performance, remember that a query may be
slower the first time it runs, as the relevant pages may not yet be
cached in memory. When testing performance or profiling a query
in eXist, you should run it several times and average the best run-
times to eliminate both cache warm-up times and JVM JIT
compilation.
You can view the real-time behavior of the caches in eXist by either connecting to
eXist using a JMX client such as JConsole, which is provided with the JVM (see
“JMX” on page 387 ), or from an XML feed of the JMX output by accessing the URI
http://localhost:8080/exist/status/ .
 
Search WWH ::




Custom Search