Database Reference
In-Depth Information
Tuning JVM
Neo4j is written in Java and as with other Java-based applications, we need to configure
JVM for optimal performance.
First and foremost, here are a few considerations for tuning the memory of any Java-based
systems, in our case Neo4j:
• Monitoring GC activity and ensuring that it is not spending too much time in
garbage collection.
• For most of the use cases, CMS garbage collector ( -XX+UseConcMarkSweep-
GC ), which collects objects concurrently and has low pause time, works well but
don't stop yourself from considering Parallel GC (-XX:+UseParallelGC ).
Parallel GC performs minor collections in parallel, which can significantly reduce
garbage collection overhead.
• Start your Java process with -server flag and based on your hardware capacity
and use case requirements, configure max memory (-Xmx) and min memory (-
Xms).
• Providing too much memory for JVM can result in performance degradation due to
the pauses caused by long GC cycles; this can happen with too less memory as
well. Monitor the memory of your system and then decide upon the appropriate
values for -Xms and -Xmx. Think twice in case you are considering anything
above 16 GB for your JVM. There can be long GC cycles resulting in performance
degradation. There are a bunch of other parameters that can be referred from ht-
tp://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html .
Search WWH ::




Custom Search