[REQ] Best Java version?

Hello,

is there a version of java, a java distribution, recommended for installing Graylog in version 4.2.5?
A version that does not particularly impact on the use of CPUs
At this moment I have installed the version:
openjdk version “1.8.0_312”
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1 ~ 20.04-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)

It may make sense to switch to the version:
openjdk version “17.0.2” 2022-01-18
OpenJDK Runtime Environment (build 17.0.2 + 8-Ubuntu-1)
OpenJDK 64-Bit Server VM (build 17.0.2 + 8-Ubuntu-1, mixed mode, sharing)

or other version/release ?

tnx in advance

Hello @alessio.dapelo
A community member had the same issue with OpenJDK. Here is what he did to resolve the Hhgh CPU issue

Hope that helps

Thanks for your answer.
So the solution could be to switch from OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1 ~ 20.04-b07) currently installed by me to Eclipse Temurin 8u312 JRE or JDK?

I personal haven’t don’t it, but from what I see in GitHub there have been issue with OpenJDK. Most community members either using a earlier version or installed a different version. Depends on what you want to do. I personal would try something different in my test environment.

Hi,

I thought I’d chime in just to tell my two cents. Please remember that I do not consider myself an authority in either Java or Graylog, I am only piecing together my impressions and experiences!

If you are using Graylog 4.2, installation docs currently suggest

Oracle Java SE 17 (OpenJDK 17 also works; latest stable update is recommended)

note that since I am still running Graylog 4.1, my experience is of little help to you, but if I were to install or upgrade to 4.2, I would seriously consider using Java 17 over Java 8 unless I had very clear indications of it not working as intended.

Regarding Java distributions, AFAIK, there should be no little to no differences between between e.g. the GA builds from Oracle, OpenJDK packages from your distribution, or Temurin. All of them come without specific warranties, from the same source code, and generally they differ only for licensing terms and release cycle (including backporting, bugfixing…). I would personally decide considering:

  • Which version/flavour is officially supported by Graylog
  • That OS-native OpenJDK packages are certainly widely used by people who use the OS, are easy to install, and are easy to maintain with the same lifecycle as the OS release, which may be important for you
  • That some other generally available builds are endorsed by players (e.g. Oracle, or Eclipse) which makes them more popular and thus have wider communities which make easier for issues and bugs to pop up and be resolved
  • That some other generally available builds may stress the fact that they are “officially adopted” by some ecosystem, and thus tested and maintained as part of it. This is the case and one of the selling points for Temurin.
  • That some vendors provide specific versions with support, SLAs, performance tweaks for you use, etc., which also may be your cup of tea.

This said, it is frequently said that Oracle Java SE has a performance advantage over plain OpenJDK (and thus Temurin). I must say that I do not have exact figures, especially not for Graylog 4.2 on Java 17, but I am all ears if someone has some to share. I can only say that I never felt I had performance issues that were specific to OpenJDK, or that I felt would change by switching to Oracle Java SE. Regarding

I blame mostly myself because I was using Java 11 while Graylog 4.1 officially seemed to support it only experimentally, suggesting Java 8 instead.

I know it is kind of a vapid reply, but I hope it provides ad least a bigger picture for you to decide.

2 Likes

@gian
Thanks for coming back and helping :+1: . It seams this issue may happen again :smiley:

Thanks for the answers and advice,
now I am testing the version on a test machine:

openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment (build 17.0.1 + 12-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 17.0.1 + 12-Ubuntu-120.04, mixed mode, sharing)
Graylog 4.2.5 + 59802bf on xxxxx (Private Build 17.0.1 on Linux 5.4.0-96-generic)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.