Best java to run ElasticSearch

Hi,

I wanted to ask which java version is best to run ElasticSearch on. I am
running ES on JRockit 1.6. Maybe it would be more stable on OpenJDK or
HotSpot or 1.7?

--
Sincerely
Kazimieras Aliulis

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

There are some factors for ES that are important when it comes to
selecting a JVM.

Technically, to take most advantage of ES, a JVM must be able to
allocate large virtual address space (so 64bit is good), it should
perform garbage collection on large heaps quickly without pausing the
JVM (Java 7 has made progress on it, but G1 GC is not mature enough
yet), and it must be able to run a lot of threads in parallel (which
means, the JVM should perform well in exploiting all the threading
capabilities of the underlying operating system).

Lucene (and of cource Elasticsearch) is on of the most challenging piece
of Java software for a JVM because it can create a lot of stress
situations where a JVM must prove that is was really implemented to cope
with heavy workloads.

In my eyes, stability is a feature for having faulty hard- and software
behavior fixed soon. In the beginning of opening the Java JDK source
code by SUN, in the early OpenJDK releases, a lot of unfixed bugs were
ported to the open source versions while the closed source JDK had them
fixed. And, the first OpenJDK 6 releases were in fact containing JDK 7
alpha quality code that was just backported to the JDK 6 API, with
numerous known bugs. So I recommend not to deploy ES on early OpenJDK 6
versions.

Today, it's not easy for me to tell if Oracle will always provide
"stable enough" JVM software, because only OpenJDK is open sourced,
while other Oracle JVM source code like security fixes and JRockIt is
hidden. The Oracle support for OpenJDK is somewhat restricted but the
OpenJDK community contains big players (like Apache and IBM) and they
are all committed to maintain a certified, solid, and reliable codebase
which is important for stability. Note that Google forked the JVM code
to build Dalvik for Android. There are also other JVM vendors, most
prominent one is IBM. But I don't have any measurable facts about JVM
stability of different vendors. In the end, it's up to you to test
several JVMs and find out the most appropriate one for your purpose.

Jörg

Am 21.02.13 15:32, schrieb Kazimieras Aliulis:

I wanted to ask which java version is best to run ElasticSearch on. I
am running ES on JRockit 1.6. Maybe it would be more stable on OpenJDK
or HotSpot or 1.7?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I never had much luck with OpenJDK. It is alway a considerable improvement
when I switch over to Oracle's JVM.

--
Ivan

On Thu, Feb 21, 2013 at 6:32 AM, Kazimieras Aliulis <
kazimieras.aliulis@gmail.com> wrote:

Hi,

I wanted to ask which java version is best to run ElasticSearch on. I am
running ES on JRockit 1.6. Maybe it would be more stable on OpenJDK or
HotSpot or 1.7?

--
Sincerely
Kazimieras Aliulis

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Kazimieras Aliulis wrote:

I wanted to ask which java version is best to run ElasticSearch
on. I am running ES on JRockit 1.6. Maybe it would be more stable
on OpenJDK or HotSpot or 1.7?

We actively test OpenJDK and Oracle Java, but JRockit has been known
to work fine.

We prefer that you use 7, but 6 is ok if you are stuck on it.

Most importantly, run the latest update of the version you choose.
For Oracle, at least 1.6u38 or 1.7u10. For OpenJDK, 6b24 or 7u3.
There have been numerous bugfixes over the last couple years that are
important to ES stability at scale.

-Drew

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.