
Eclipse OpenJ9 – Open-source JVM - jsiepkes
https://github.com/eclipse/openj9
======
walkingolof
It's the IBM J9 donated to the Eclipse foundation:
[https://en.wikipedia.org/wiki/IBM_J9](https://en.wikipedia.org/wiki/IBM_J9)

------
notimetorelax
The "Welcome to the Eclipse OpenJ9 repository" is just brilliant. So many
product blogs and source code repositories fail to introduce the product
first.

~~~
inamberclad
I'm confused. Do you think they're doing it right with that as an intro?

~~~
qarioz
On the first point I can see that it's high performance enterprise grade jvm.
It's a good introduction. There are many projects that's difficult to
understand even after scrolling or clicking.

------
dvt
This is really interesting: CUDA support out of the box[1]. I've never seen
this before, does any other JVM do it?

[1]
[https://github.com/eclipse/openj9/tree/master/runtime/cuda](https://github.com/eclipse/openj9/tree/master/runtime/cuda)

~~~
agibsonccc
We've actually implemented something like this ourselves with our linear
algebra library.

We wrote our own gc for cuda:
[https://github.com/deeplearning4j/nd4j/tree/master/nd4j-back...](https://github.com/deeplearning4j/nd4j/tree/master/nd4j-backends/nd4j-backend-
impls/nd4j-cuda/src/main/java/org/nd4j/jita)

as well as:
[https://deeplearning4j.org/workspaces](https://deeplearning4j.org/workspaces)

It also integrates with the JVM via weak references as well.

I can attest to:
[https://news.ycombinator.com/item?id=15269537](https://news.ycombinator.com/item?id=15269537)
as well, you really need this 3rd party due to the frequency of how often cuda
changes. We usually end up having to support the 2 most recent cuda versions.

~~~
dvt
Very cool, thanks for the reference!

------
hyperrail
It seems like such a long time ago since Sun/Oracle and Apache Software
Foundation fought over the licensing of the Java Technology Compatibility Kit
(Java implementation test suite) for Apache Harmony, their JVM and Java class
library implementation which was used as part of Android for a long time.[1,2]

Hopefully OpenJ9 will meet with better success. On paper, it seems to meet the
restrictions that Oracle currently imposes for TCK access, namely that it is
available under a GPL license and that its class library is derived from
OpenJDK.[3,4] And it comes from IBM, which has been able to put aside its
differences with Oracle on OpenJDK in the past, when it became clear that
Oracle would never support Harmony (which IBM previously backed).[5]

But when it comes to Oracle and intellectual property, who knows?

[1]
[https://en.wikipedia.org/wiki/Apache_Harmony#Difficulties_to...](https://en.wikipedia.org/wiki/Apache_Harmony#Difficulties_to_obtain_a_TCK_license_from_Sun)

[2]
[http://www.apache.org/jcp/sunopenletter.html](http://www.apache.org/jcp/sunopenletter.html)

[3]
[http://openjdk.java.net/groups/conformance/JckAccess/](http://openjdk.java.net/groups/conformance/JckAccess/)

[4] [http://openjdk.java.net/legal/octla-java-
se-8.pdf](http://openjdk.java.net/legal/octla-java-se-8.pdf)

[5] [http://blog.joda.org/2010/10/no-java-7-end-
game_4619.html](http://blog.joda.org/2010/10/no-java-7-end-game_4619.html)

~~~
kodablah
> namely that it is available under a GPL license

Not exclusively from what I see, seems you can choose the Eclipse Public
License. From your #4 link:

> Licensee may not: [...] (iii) distribute a Licensee Implementation under any
> license other than a GPL License

I hope they revoke their TCK license personally (ex-dev below stated it
passed). I would hope then implementations would stop supporting this "Java"
naming/certification single-company gatekeeping and instead support and
contribute to the open test suite.

------
ksec
So IBM has OpenJ9 and OMR, Oracle has Graal and Truffle.

The JVM space is suddenly getting very interesting. But my question is, why
now? While OMR did opened up a year ago it didn't seems to have gained any
traction.

Then there was the JavaEE last week opened also going to Eclipse, which is
strange because it has always been IBM going to Eclipse and Oracle goes to
Apache.

Not to mention the OpenJDK builds [https://blogs.oracle.com/java-platform-
group/faster-and-easi...](https://blogs.oracle.com/java-platform-group/faster-
and-easier-use-and-redistribution-of-java-se)

What is going on in the Java Land? Because I dont for a moment believe these
company are doing it for good of Java. At least not from IBM and Oracle.

Or am i thinking too much into it?

~~~
agibsonccc
Hi,

I do not work at any of the major JVM vendors but can point to trends in the
space. Disclosure: My business relies heavily on the JVM and I am heavily
involved in the java community from the AI side. We also do a ton of java
systems development and have had conversations with many of the JVM vendors
over the years including azul,oracle,red hat, and IBM.

Azul started running a "pure openjdk" distro a bit ago that they provide
support for. They also provide a licensed embedded version. They are
differentiating with a pauseless GC.

Oracle uses the JVM in a lot of their products. App servers are slowing down
in favor of microservices now. This unbundling started with spring boot and
supporting Java EE annotations.

We can see this with Java EE migrating to eclipse now because the annotations
themselves have become commoditized.

Red hat started supporting jdk 7 in RHEL and was probably a bigger proponent
of the "open" bits.

Overall here, just of note: Java has always had the JCP.
[https://jcp.org/en/home/index](https://jcp.org/en/home/index)

I'm guessing that enough of the member organizations started pushing more for
opening of the JVM.

Finally overall, we can see in the space that even at java conferences, a lot
of conversations are moving towards "JVM as a platform" including scala and
clojure in the conferences now.

So overall, I would say it's largely a shift in both the thinking and the way
you monetize the JVM.

------
vbezhenar
That's awesome. It was always some weird situation with abstract JVM
specification but only one de-facto standard implementation which everyone
used. I hope J9 will be a viable alternative, so everyone wins.

~~~
jsiepkes
How so? There was BEA JRockIT, IBM J9, Azuul, Oracle and HP also have a JVM
iirc.

~~~
hiram112
I've been a Java dev for a decade, and I never once used anything but Sun /
Oracle's version (now OpenJDK, which is almost the same thing).

I really have no idea who ever used these other JVM implementations. I'm
guessing it would be companies with specialized hardware such as IBM
mainframes or finance firms paying a lot of money to squeeze out performance
with WebLogic. Either because of poor marketing or some other reason, no
developer or company I worked with had a reason to use anything else.

~~~
lobster_johnson
Back in the early 2000s, the IBM JVM was freely available and frequently used
as a drop-in replacement for the Sun JVM, since it was often faster and less
memory-hungry.

IBM also had an open-source Java compiler written in C++, Jikes [1], that was
considerably faster than Sun's javac. However, it was eventually abandoned.
Jikes is coincidentally also the name of IBM's open-source research JVM [2],
which is still under development.

Azuul is apparently popular in areas requiring low latency, such as financial
trading.

As an aside, there are many niches that most people haven't heard about. You
might be surprised about all the kinds of software that are hiding under rocks
— invisible to most people because they're not working in that industry.
Things like MUMPS, K/kdb, Fortran, Delphi — lots of obscure stuff that has
left the mainstream (or never entered it in the first place) but is still in
use.

[1] [https://en.wikipedia.org/wiki/Jikes](https://en.wikipedia.org/wiki/Jikes)

[2]
[https://github.com/JikesRVM/JikesRVM](https://github.com/JikesRVM/JikesRVM)

~~~
seanmcdirmid
Jikes RVM was known as Jalapeño first, then they changed the name to Jikes RVM
due to a name clash (Jikes Java compiler already existing at the time). I'm
not sure it is still active though, a lot of researchers left IBM a few years
ago (2012) and Java ceased to be the hot topic anyways.

------
darren0
Wow. It's been about 6 years since I last used j9, but at the time I used it
it was extremely good. But I was running on Power, which is it's sweet spot.

------
karianna
Hi all,

I'm one of the authors behind
[https://www.adoptopenjdk.net](https://www.adoptopenjdk.net) (CI at
ci.adoptopenjdk.net, project at github/adoptopenjdk) where we are providing
nightly and release builds of OpenJ9 (as well as a host of other OpenJDK
derivatives). We've recently been granted the TCK (as the London Java
Community) and so you'll shortly have professionally tested 'You can call this
Java' binaries.

------
ledgerdev
Let's get straight to the really important question, can J9 or AOT help maybe
just a little with clojure startup time woes?

~~~
kimi
I tried some quick tests using a fully AOT, short-running thing we run in
house. Here the cost is the set-up of JVM and loading of Clojure stuff (CentOS
7 Vagrant VM on my Mac).

 _J9:_

time ./jdk-9+181/bin/java -client -jar l2i-0.1.0-SNAPSHOT-standalone.jar

real 0m1.987s user 0m3.383s sys 0m0.161s

time ./jdk-9+181/bin/java -server -jar l2i-0.1.0-SNAPSHOT-standalone.jar

real 0m2.949s user 0m5.452s sys 0m0.167s

 _OpenJDK 8:_

[root@localhost ~]# time java -server -jar l2i-0.1.0-SNAPSHOT-standalone.jar

real 0m1.545s user 0m2.510s sys 0m0.175s

time java -client -jar l2i-0.1.0-SNAPSHOT-standalone.jar

real 0m1.456s user 0m2.309s sys 0m0.182s

\----

For whatever it means, this is a repeated execution of 10 runs together for
J9:

real 0m17.341s user 0m26.783s sys 0m1.344s

And this is the same thing for openjdk version "1.8.0_144"

real 0m15.169s user 0m24.573s sys 0m1.711s

So I'd say that the answer to your question is is no, they are in the same
class for a short-running Clojure app dominated by startup times, unless there
is some special tweak.

~~~
ShroudedNight
The OpenJ9 infrastructure is somewhat different [for the better] than what I'm
used to using internally, but I have only ever seen the shared class cache
enabled when the -Xshareclasses [1] option is passed to the JVM. Do these
numbers change significantly (especially after a warm-up run) if you add that
option to J9's option set?

[1]
[https://www.ibm.com/support/knowledgecenter/en/SSYKE2_8.0.0/...](https://www.ibm.com/support/knowledgecenter/en/SSYKE2_8.0.0/com.ibm.java.lnx.80.doc/diag/appendixes/cmdline/Xshareclasses.html)

~~~
kimi
see above

------
riku_iki
Curious what performance it has comparing to default VM from OpenJDK.

~~~
walkingolof
There was a redhat sponsored benchmark released 3-4 years ago, should however
note that J9 was developed by IBM, which owns the Power architecture and this
test was run on Intel.

[http://www.principledtechnologies.com/Red%20Hat/RHEL6_rhj_06...](http://www.principledtechnologies.com/Red%20Hat/RHEL6_rhj_0613.pdf)

~~~
ShroudedNight
Disclaimer: I work on the IBM J9 JIT + OMR compiler team, so I am in no way a
neutral authority, nor do I speak for my employer.

'Even' on Intel, we go back and forth on benchmarks, depending on what each
side is focusing on. Some metrics take longer than others to flip-flop but
both sides have some _very_ smart people constantly working to make
performance better.

And FWIW, we have a team dedicated to making x86 perform well.

Two things to consider about this particular result:

1) This is running on what I expect to be our pxa6470sr4-20130207_01 release
(if I'm interpreting the 'java-x86_64-70-4' correctly). There has been a _ton_
of work on J9 since then, and I would be _very_ leery of using that result as
canonical for 2017

2) SPEC jbb2013 was retracted due to a flaw:
[https://www.spec.org/jbb2013/defectnotice.html](https://www.spec.org/jbb2013/defectnotice.html)
. I don't know what the implications of that flaw would be on these benchmark
results (if any) but I would want more data before concluding anything.

That said, the 'other side' does do some really good work, and does score
wins. We work hard to do the same. Even on Intel ;)

------
crudbug
Interesting news in Java world.

Does this support AOT ?

~~~
nfa_backward
[http://www.eclipse.org/openj9/](http://www.eclipse.org/openj9/)

"Shared classes and Ahead-of-Time (AOT) technologies typically provide a
20-40% reduction in start-up time while improving the overall ramp-up time of
applications. This capability is crucial for short-running Java applications
or for horizontal scalability solutions that rely on the frequent provisioning
and deprovisioning of JVM instances to manage workloads."

------
7scan
In my experience J9 needs to be finely tuned to reach maximum performance for
a specific use case other than enterprise application throughput. Try using
the -Xquickstart flag if you want to improve startup time.

------
tmzt
Any chance of an official unikernel distribution, or single entry-point
mechanism for container images.

This along with AOT cached classes being baked into a vm/container image would
be interesting.

------
leoh
Wonder if it will be possible to compile under OS X. Curiously OS X binaries
have never been available for J9.

~~~
mstoodle
Eclipse OpenJ9 builds on top of Eclipse OMR. Eclipse OMR has OS X builds ...
What a great thing it would be to have OpenJ9 building and running on OS X :)
!

Disclaimer: I am a project lead for both Eclipse OpenJ9 and Eclipse OMR.

OS X has been talked about, but we have a lot of plumbing to connect up at the
project right now and that has high priority for us. If someone wants to kick
that work off, I would happily encourage it :) .

~~~
mstoodle
I opened an issue where discussion on OS X support can happen:
[https://github.com/eclipse/openj9/issues/36](https://github.com/eclipse/openj9/issues/36)

------
yctim
Congrats! This is really cool!

------
wiz21c
Is it a move from IBM to sidestep Oracle ? (I have no idea, just asking)

------
kodablah
So is this OpenJDK-derived? If so, too bad, I've been hoping for a truly
independent implementation. If not, does it pass the TCK?

~~~
filereaper
Ex-J9 engineer here, J9 was built completely in a clean-room. It does pass the
TCK tests.

~~~
nickhalfasleep
What is the 9 for? Jackknife? Jabbering?

~~~
filereaper
There's some mythology here, perhaps another J9 greybeard can answer. The
story I've heard so far goes as follows...

There was some constant for 8K that was mistyped incorrectly, something like
instead of:

#define 8K 8192

They mistyped and wrote:

#define 8K 8096

This caused all sorts of bugs and was known internally as the 8K bug. When
time came to write the Java VM, they wanted to name it as "post 8k bug" they
named it K9, but K9 sounds like a dog (woof) so they decremented the K to land
on J9.

At least that's what I've heard...

 _shrugs_

~~~
rservant
Here's the true story: [https://medium.com/@rservant/how-did-the-j9-in-
openj9-get-it...](https://medium.com/@rservant/how-did-the-j9-in-openj9-get-
its-name-95a6416b4cb9)

------
coolspot
Better late than never.

------
bobsgame
Will a Java expert (JVM developer) please answer this question? Thank you.

How impossible would it be to add a delete keyword to the JVM, and why?

~~~
shemnon42
Java does memory recovery strictly by garbage collection. To delete an object
remove all references to that object and wait.

A "delete now" operation imposes requirements on implementations that are not
strictly required.

Any advantages gained from destructors can be realized via explicit cleanup
methods and (as a hedge against mis-use) state checking for initialized and
destroyed objects. A delete operation also adds risk that an object that has
been deleted may be referenced again (although with esoteric stuff like
PhantomReferences you can almost do it).

~~~
bitwize
What about the "automatically gets cleaned up when the object goes out of
scope" advantage of destructors?

~~~
guipsp
You can do that with try-with-resources

