Using Solr / Lucene with OpenJDK

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Solr / Lucene with OpenJDK

Steven White
Hi everyone,

We currently support both Oracle and IBM Java to run Solr and I'm task to
switch over to OpenJDK.

Does anyone use Solr, any version, with OpenJDK?  If so, what has been your
experience?  Also, what platforms have you used it on?

I run Solr on Windows, Linux, AIX and Solaris and on each of those
platforms, I need to support both 32 and 64 bit Java.

Thanks,

Steven
Reply | Threaded
Open this post in threaded view
|

Re: Using Solr / Lucene with OpenJDK

Shawn Heisey-2
On 4/24/2018 8:50 AM, Steven White wrote:
> We currently support both Oracle and IBM Java to run Solr and I'm task to
> switch over to OpenJDK.

Oracle Java is the preferred choice.  OpenJDK should be work very well,
as long as it's at least version 7.  Recent Solr versions require Java
8, so that should be no problem.

OpenJDK versions before 7, and IBM's Java, are not recommended.  OpenJDK
6 has known bugs, and IBM's Java enables so many performance enhancement
optimizations in the language that parts of Lucene misbehave when
running in IBM Java.

> Does anyone use Solr, any version, with OpenJDK?  If so, what has been you
> experience?  Also, what platforms have you used it on?

I've used it on Linux.  It worked without issues.

> I run Solr on Windows, Linux, AIX and Solaris and on each of those
> platforms, I need to support both 32 and 64 bit Java.

Another strong recommendation:  Don't use 32-bit Java. There's nothing
technically wrong with it, but it artificially limits the size of the
heap to 2GB.  It doesn't take super-big indexes to require more heap
memory than that.

As mentioned early on, Oracle Java is what we prefer.  OpenJDK is the
reference implementation for the language starting with version 7,
though -- so we can be pretty sure that you're not missing anything by
using OpenJDK.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: Using Solr / Lucene with OpenJDK

Christopher Schultz
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Shawn,

On 4/24/18 11:23 AM, Shawn Heisey wrote:
> On 4/24/2018 8:50 AM, Steven White wrote:
>> Does anyone use Solr, any version, with OpenJDK?  If so, what
>> has been you experience?  Also, what platforms have you used it
>> on?
>
> I've used it on Linux.  It worked without issues.

What version of OpenJDK did you happen to run?

My preference would be for Java 8, but on my Debian Wheezy install
only Java 7 is available.

In general, I prefer package-managed versions of everything whenever
possible, but I have found that on Debian the openjdk package requires
many dependencies that I might not otherwise want to install (at least
not globally)[1], so I tend to go with the tarball from Oracle.

I'm still on the fence for a production deployment.

- -chris


[1] Here's what Debian Wheezy currently says it wants to install when
I tell it to install the "default-jre" package:

  ca-certificates-java dbus default-jre default-jre-headless
fontconfig fontconfig-config hicolor-icon-theme java-common libasound2
  libasyncns0 libatk-wrapper-java libatk-wrapper-java-jni libatk1.0-0
libatk1.0-data libavahi-client3 libavahi-common-data
  libavahi-common3 libcairo2 libcups2 libdatrie1 libdbus-1-3
libdrm-intel1 libdrm-nouveau1a libdrm-radeon1 libdrm2 libffi5 libflac8
  libfontconfig1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgif4
libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-0
  libglib2.0-data libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libice6
libjasper1 libjbig0 libjpeg8 libjson0 liblcms2-2 libnspr4
  libnss3 libogg0 libpango1.0-0 libpciaccess0 libpcsclite1
libpixman-1-0 libpng12-0 libpulse0 libsctp1 libsm6 libsndfile1
  libsystemd-login0 libthai-data libthai0 libtiff4 libvorbis0a
libvorbisenc2 libx11-6 libx11-data libx11-xcb1 libxau6 libxcb-glx0
  libxcb-render0 libxcb-shm0 libxcb1 libxcomposite1 libxcursor1
libxdamage1 libxdmcp6 libxext6 libxfixes3 libxft2 libxi6 libxinerama1
  libxrandr2 libxrender1 libxtst6 libxxf86vm1 lksctp-tools
openjdk-7-jre openjdk-7-jre-headless shared-mime-info ttf-dejavu-core
  ttf-dejavu-extra tzdata-java x11-common

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlr0XYMACgkQHPApP6U8
pFhldRAAr5/LCc8ufhGjMWbtK2GrUcinD/znUq8QV4CGjfBclg+FHGAMQ00Er8na
TTeY4shHdsdHq82sEzTXX7ySoeKV4pd6+LbsxT2q0uzTIoXbXFdpsPThBESaKTNB
BvdA+T7CHpknE7zH4b0ebxiCnWlQM5VkDgKK/bgte2IXoK7y1iXxh30id3DET1qo
e9i96umNDSZ6Ik7s03rK/JoU6j1EHCz+80mbERWSie/z9T/6+avCcYp3fB570ue9
aysX8yzBhiwp+YFiEJ9cDlOrccmC4vaWgZgRHRWnbIlvnPQys4pq+qSHSqU22iy7
e1HBob0f6ZN1yK1gM8UC29w4XVwDF6CCh+xlH5arvoX38ucNvhOVj2EPyUY2sLAy
uEsqwhjDPRphYLRoMiis/3RV9MksvbUs+HOIFhciFB7OnOd4MsQA5a9VJi8txeVA
adLEoAYKZw0u9wvue/J5481aja+JPBJwE9f5zbTCliTK9Ojk2FKY8syB6FYs2qvX
42Epr7eaj22gxEMrektH0WcH+keSg6fzzPh9QypNHRYGjSDsbDkyoa/cFRdVHt4D
NrvvaGMFhf1/KzQFVvsiVo5zBF5xPzh9EQBu3HhIb7yQFdKTuCx2mxgnJ4rOl7pg
twXGB+oRTQeT70LxEDN4ozUgAe/dT7CCtj3LPoWK8yRylvzReWc=
=ExdU
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: Using Solr / Lucene with OpenJDK

Shawn Heisey-2
On 5/10/2018 8:56 AM, Christopher Schultz wrote:
> What version of OpenJDK did you happen to run?

I don't remember for sure, but it was probably version 8. All my current
Solr installs are on machines with Oracle Java.

> My preference would be for Java 8, but on my Debian Wheezy install
> only Java 7 is available.

In that case, you will be limited to Solr 5.x or earlier. Solr requires
Java 8 as of 6.0.

> In general, I prefer package-managed versions of everything whenever
> possible, but I have found that on Debian the openjdk package requires
> many dependencies that I might not otherwise want to install (at least
> not globally)[1], so I tend to go with the tarball from Oracle.

There is a REALLY nice PPA setup for Ubuntu that lets you easily install
Oracle Java.  It actually downloads the JDK directly from Oracle as part
of the package install.  It will let you install multiple major
versions, and includes packages that let you indicate which version you
want to be default.

Debian can also use the same PPA repository as Ubuntu, but on older
versions it may be more complicated to get it going. This guide is for
Debian 8:

https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-debian-8#installing-the-oracle-jdk

Thanks,
Shawn