Eclipse OpenJ9 – Open-source JVM
github.com
github.com
[1] https://github.com/eclipse/openj9/tree/master/runtime/cuda
We wrote our own gc for cuda: https://github.com/deeplearning4j/nd4j/tree/master/nd4j-back...
as well as: 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 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.
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...
[2] http://www.apache.org/jcp/sunopenletter.html
[3] http://openjdk.java.net/groups/conformance/JckAccess/
[4] http://openjdk.java.net/legal/octla-java-se-8.pdf
[5] http://blog.joda.org/2010/10/no-java-7-end-game_4619.html
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.
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...
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?
Could. Oracle and IBM are realising that WebLogic and WebSphere licensing revenue isn't going anywhere and if they want to grow revenue and achieve lock-in they have to find a new way.
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
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.
J9 was largely used for IBM products which means it wasn't exposed to or tuned for workloads outside. Opening it up is a very good thing.
OMR is the foundation for J9, and it tackles the issues that come up again and again in dynamic runtimes:
1. Having a good threading, networking library, etc...
2. Having a battle tested industrial strength GC.
3. Having a JIT with easy to use optimizations out-of-the-box.
4. Having solid tooling for debugging and performance introspection.
Other runtimes such as Ruby, Python are at various stages of improving their GC or adding a JIT. The goal with OMR is to turn the battle tested components of J9 into pluggable components for these other runtimes. If tomorrow somebody wants to make a new Ruby or Python they shouldn't have to write their own GC or JIT, the same way nobody writes their own filesystem these days.
Oracle and IBM both see this and Truffle/Graal are different ways of attacking the same problem.
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.
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.
We had to use the IBM JVM for running tests and precomputing stuff, otherwise stuff wasn't working.
I'm one of the authors behind 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.
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.
That said I'm not that surprised that class aot compilation didn't really speed up a clojure app.
[1] https://www.ibm.com/support/knowledgecenter/en/SSYKE2_8.0.0/...
# time for i in `seq 1 10`; do ./jdk-9+181/bin/java -client -Xquickstart -jar l2i-0.1.0-SNAPSHOT-standalone.jar; done
real 0m18.571s user 0m30.429s sys 0m1.374s
# time for i in `seq 1 10`; do ./jdk-9+181/bin/java -client -Xshareclasses -jar l2i-0.1.0-SNAPSHOT-standalone.jar; done
real 0m16.642s user 0m19.483s sys 0m6.307s
Depending on how smoothly your experimentation went, you may also have to destroy a pre-existing cache before you really measure it (java -Xshareclasses:destroy) as it could have stale classes in it from an earlier run.
Would you be willing to open an issue with more details at http://github.com/eclipse/openj9/issues so we can look into it?
I'd be interested in seeing whether that holds true for OpenJ9.
[0] https://github.com/dsyer/spring-boot-startup-bench/tree/mast...
http://www.principledtechnologies.com/Red%20Hat/RHEL6_rhj_06...
'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 . 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 ;)
Does this support AOT ?
"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."
This along with AOT cached classes being baked into a vm/container image would be interesting.
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 :) .
J9 actually has its roots in an earlier Smalltalk VM (VisualAge Smalltalk, I think). The source copyrights go back to 1991. Eclipse, of course, was what IBM started after abandoning VisualAge.
It's not a JDK/JRE. J9 must be combined with OpenJDK to be able to run apps.
well yes and no. if you don't use anything from the standard class library (that's impossible) than not. what I also guess is that you need a java compiler, since it reads that it uses a ibm created "rom file" that comes from java bytecode.
what the most interesting thing about that vm is, is a shared class cache. which is like a *.so file, if one program loads a library and the library is already in memory another program won't add additional memory to the computer, this is a huge win, especially for memory hungry java applications (this already speeds startup extremly)
To be more precise, a compiler is required for JSP, which is a mixture of html and java that is compiled to servlets.
Theoretically you can compile them ahead of time (before deployment) but as far as I can tell no-one does.
I mean ecj is also not included in openj9, so if you want to strip out any openjdk dependency one would need at least a really basic class lib and a compiler (either ecj or anything else), (but I also think it hears that openj9 includes a compiler https://www.youtube.com/watch?v=96XoG6xcnys at the end he only says that they use the class library from openjdk, but he does not say if anything else and it also looks like it only uses that).
No IBM has its own full JDK that you can download, but the rest of it other than the JVM is not being open sourced at this time. That's my understanding at least.
Oracle has stated that for open source, only OpenJDK derivatives get access to the TCK.
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
How impossible would it be to add a delete keyword to the JVM, and why?
Manual memory management is a good choice if you have both worst-case latency concerns as well as very restricted RAM and/or severe energy constraints (basically, the kind of applications that Rust was designed to handle).
That’s horrible to use for game development.
why would some kind of that be problematic? I mean graphics programmic is kind of new to me, but considering that you could offload that to a c/c++ engine via jni (that's another horrible thing of some kind), but just the game code itself doesn't seems to be to bad, does it?
The whole point is not to offload anything. If you need to offload anything, even the render loop, the language has failed.
That's not the RTSJ solution. RTSJ uses arenas, which are great if you have regular allocation/deallocation cycles, like, say, a frame in a game.
So how do I get a user’s Oracle JRE installation to use arenas? The only realistic scenario is to preallocate and reuse.
[1]: https://www.ibm.com/support/knowledgecenter/en/SSSTCZ_3.0.0/...
(Keep in mind that Java is a memory-safe language.)
If those 11 threads would share the same heap and 1 thread still doesn't use the gc because it's using manual memory management then you'd still suffer from stop the world pauses.
What you want is isolated heaps like erlang does, not manual memory management. I'm still wondering why we have no other programming languages with multiple heaps. You could probably achieve something similar with D and use of memory mapped files to efficiently share memory without copying bewteen processes. Alternatively you could call into C to spawn OS threads that don't suffer from stop the world pauses. But those two options are a hack. You're not supposed to use D like that.
I chose D as an example because it's a programming language with both a garbage collector and manual memory management that still suffers from stop the world pauses.
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).
http://www.docjar.com/docs/api/sun/misc/Unsafe.html#freeMemo...
If you want manual memory allocation then you should instead look at sun.misc.Unsafe.
http://www.docjar.com/html/api/sun/misc/Unsafe.java.html
public native long allocateMemory(long bytes);
public native void freeMemory(long address);
Of course you still have to calculate the field offsets and all that stuff manually because it's not a part of the java language but you only asked about the JVM.