On 12/10/23 20:36, Jim Morgan wrote:
Now we're looking at java. Its currently running on openjdk-8. I've tried
upgrading to openjdk-11 and openjdk-13. The process, as this is Ubuntu is
basically.

Don't use Java 13. It is a non-LTS release. Non-LTS releases are only supported for 6 months, so that version has been out of support for more than three years -- support ended in March 2020.

Java 11 is a good solid choice. Java 17 seems to perform a little better than 11 on Solr 9.x, but I haven't actually measured it. Java 8, 11, 17, and 21 are the current LTS releases.

https://en.wikipedia.org/wiki/Java_version_history

I personally wouldn't trust Solr 8.x with Java 17, as that's a jump of 9 major Java versions ... but others have done it and I haven't seen reports of problems. I use Java 17 with Solr 9.x on Ubuntu.

With Java 11 or later, I think it would be a good idea to switch garbage collection to ZGC. I have this in my /etc/default/solr.in.sh:

GC_TUNE=" \
  -XX:+UnlockExperimentalVMOptions \
  -XX:+UseZGC \
  -XX:+ParallelRefProcEnabled \
  -XX:+ExplicitGCInvokesConcurrent \
  -XX:+AlwaysPreTouch \
  -XX:+UseNUMA \
"

Side note: You should be using update-java-alternatives instead of update-alternatives. It will update ALL of the binaries for java, not just /usr/bin/java.

Showing available options:

elyograg@smeagol:~$ update-java-alternatives -l
java-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64 java-1.17.0-openjdk-amd64 1711 /usr/lib/jvm/java-1.17.0-openjdk-amd64 java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64

You would then follow that with something like:

update-java-alternatives -s java-1.11.0-openjdk-amd64

If Solr will not start with Java 11, look in solr.log and solr-NNNN-console.log for info about why it failed.

Thanks,
Shawn

Reply via email to