Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: removed redundant title info

Shawn Heisey

Table of Contents

Java recommendation for Solr

For verions from 6.0.0 through 9.0.0, I would recommend Java 11.  For 9.1.0 or later, I would recommend Java 17.  Not sure I can recommend running any Solr version below 6.0.0.  Java 11 17 is noticeably faster than Java 11 in my small-scale experiments.

...

OpenJDK should be fine.  Other Java varieties like Coretto Corretto (from Amazon) have been used with success.  Oracle works well, but has a price tag.  If you are already paying for Oracle Java, it's a great option.

...

The following settings were created as a result of a discussion with Oracle employees on the hotspot-gc-use mailing list:

No Format

JVM_OPTS=" \
-XX:+UseG1GC \
-XX:+ParallelRefProcEnabled \
-XX:G1HeapRegionSize=8m \
-XX:MaxGCPauseMillis=200 \
-XX:+UseLargePages \
-XX:+AggressiveOpts \
"

...

My current experiments are using Java 17 and ZGC.  My observations are that G1GC can do a full reindex faster than ZGC, but has distinctly longer GC pauses.  Note that "longer" is still VERY small, below human perception levels.  Also, a ful full reindex on my system is mostly single-threaded.  I suspect that installs with a VERY large heap or doing heavily multi-threaded indexing will REALLY shine when running ZGC.

ZGC is not available on a 32 bit Java, and always uses 64 bit pointers, so there is no advantage to setting the heap size below 32GB, as there is with G1 and older collectors.

ZGC claims that its pause times do NOT increase as the heap gets larger.  Older collectors like Parallel, CMS, and G1 do show an increase in pause times as the heap grows.

CMS (ConcurrentMarkSweep) Collector

...