At the JavaOne 2013 conference, which recently ended in San Francisco, Microsoft Open Technologies and Azul Systems announced Zulu, an OpenJDK port for the Windows Azure cloud platform. Considering that three months ago, Oracle and Microsoft announced a partnership in the field of cloud technologies, many expected that Oracle would release the JVM for the cloud platform from Microsoft. However, this JVM was released by Azul Systems, a multi-year
licenser of Java SE, known for its high-performance server solutions with large hips.
In the first part of the article we will try to figure out who this Zulu is and what we can expect from it. Is this just the beginning of the journey or a ready-made solution? In the second part, we will proceed to unpacking the Zulu Technology Preview and, as a side effect, we’ll see how Oracle has stuffed its JDK so much that it weighs one and a half times more than Zulu.

')
Java: Oracle and IBM? Azul and Microsoft!
Interesting times are coming. More precisely, already arrived. In the past six months, Azul and Microsoft have somehow become more active in terms of Java, and specifically in Russia. Judge for yourself:
- In April, at the St. Petersburg Java conference, JPoint Azul sponsored , and its VP of Engineering Anya Barski made a plenary report, after which rumors that Azul was opening an office in St. Petersburg were actively spread.
- in late July, Oracle and Microsoft announce a partnership in the field of cloud technologies
- in July, rumors about Azul in St. Petersburg are confirmed
- a few days ago at JavaOne Azul and MS Open Tech present Zulu
Who are the Azul
In general, Azul Systems is known for its high-performance Java solutions. They started by making their Java on ... hardware. Well, more precisely, it is Linux, just all the calculations are performed on a separate board (
NVidia CUDA immediately comes to mind). The solution is called
Azul Vega . The latest versions
contain hundreds of cores and hundreds of gigabytes of RAM.
@TheShade once told the story of his work at Intel. They say they took a standard benchmark, in which Sun's Java gave 4000 parrots, they began to optimize their implementation and after long labors they managed to squeeze out 5000 parrots. “Hooray!”, They shouted, and published an article about how they made Sanov's implementation as much as 25%. After that, the guys from Azul came, took a benchmark and got on their Vega not 4,000 or 5,000 parrots, but a million . A curtain.
A few years ago, Azul created a pure software solution - Zing for Linux. Apparently, starting with some version of Linux 2.6 API, Linux has become enough to abandon the iron part and port its best practices from the iron part to software. It turned out pretty cool. Zing is positioned as a solution for large hip vehicles:
As you know, every bun is worth something. In the case of low latency, we always have to sacrifice
everything else through throughput. A well-known
elizarov master
told me recently over tea that they were trying to get the coolest latency on the stand when loading percents by 5%, and already in the region of 10% latency was beginning to sag. Perhaps the twists from Azul could have made their decision much better, but this is not about that at all now.
Azul press release
What does Azul officially tell us in
its press release ?
First, it says about Windows Azure. Secondly, there is a fashionable now “community-driven”. Thirdly, it says about full
compatibility with the Java SE 7 specification. So, these guys didn’t break OpenJDK much, which pleases :) But all this is clear.
From the interesting: Azul will actively upload patches and bugfixes to OpenJDK. That is, not only to use someone else's, but also to contribute. This is a cool statement, but not new. Any normal Java licensee does this at least to get rid of the headache.
Imagine that we have a cunning licensee Vasya, who found a bug in OpenJDK, fixed it in his fork, but did not tell the others. That is, not for backportil. And sitting so pleased with himself. Let's say in a month the same problem was found by honest Peter, fixed it in his own way and filled it in OpenJDK. As a result, at the first synchronization with the updated OpenJDK, Vasya will have a bathert conflict in the source code, which will need to be dealt with. And this is something else fun.
Microsoft eyes
In Redmond, too, are not asleep. The dude from Microsoft Open Technologies
writes on MSDN that the trick is that now the latest versions of OpenJDK 7 for Windows are now available in binary form thanks to Zulu, and later quotes the Azul press release.
Press
Joab Jackson at ComputerWorld
notes the obvious: Azul
will be the default platform in Azure for those who need Java in Azure as a service. In addition, he mentions
Oracle Cloud , in which Oracle
for some reason does not provide Java SE as a service, but rather provides a higher level solution as a service - Java EE. Like, deploy your JavaEE application in the Oracle Cloud, and then we'll figure out how to effectively implement it.
It sounds reasonable from the point of view of the cloud model on the one hand, and like screwing a bolt on Java SE on the other. Does a business need Java SE without Java EE? Is it worth bothering for her? Judging by the
article , Microsoft answers this question more likely in the affirmative, and Oracle rather negatively. It should only be noted finally that this is an article on ComputerWorld, and not an official release of Oracle or Microsoft.
Unpacking
So, touch the Zulu Technology Preview. On the official website of Azul Systems is a
link . We click and, lo and behold, in front of us is a 60 MB zip archive. Judging by the name, this build is compiled on OpenJDK 7u25 and sharpened under Windows x64. For reference, Oracle JDK 7u25 under win x64 weighs about 90 megabytes, and Oracle JDK 7u40 already as much as 125 megabytes. Run:
D:\zulu1.7.0_25-7.0.0.0-win64\bin>java -version
openjdk version "1.7.0_25"
OpenJDK Runtime Environment (Zulu 7.0.0.0-win64) (build 1.7.0_25-b34)
OpenJDK 64-Bit Server VM (Zulu 7.0.0.0-win64) (build 23.25-b03, mixed mode)
hmm ok It seems we got an answer to the first question. At the moment, in the fall of 2013, Azul Zulu is only the
beginning of a cloud Java project.
Walk through the insides of the archive. The unpacked jdk 1.7.0_25 weighs 216 megabytes, and the unpacked zulu 1.7.0_25 weighs 136 megabytes. Where did the
dog rummage the remaining 80 meters?
- The bin folder weighs 1.7 meters in Zulu versus 2.5 in the Oracle JDK. Trifle, but interesting. We go inside and see that the file names are the same, except that the dimensions are different. Most small exe-shnik at Oracle weighs 16 kilobytes, and at Azul - at 9 kilobytes. It seems that the difference is simple in the compiler, which these same ekzeshniki did. Well, or in the settings. java.exe and javaw.exe differ by 11 kilos (185 for Oracle versus 174 for Azul). The size of unpack200.exe is significantly different (177K versus 109K). I am glad that at least Maykrosoftovskaya msvcr100.dll weighs equally in both distributions :)
- Azul has no 5 MB db folder with JavaDB. But there are demo and sample folders with a total weight of just about 5 meters.
- src.zip weighs about the same, 21 megabytes
- Oracle's include folder is 150K more due to the presence of wrappers around AccessBridge DLL calls needed for Java Accessibility to work
- Azul jre is less by 50 meters: 76 vs. 126. Look inside. The jre / bin weighs 13 meters versus 36. From the large-scale there are no libraries for the mentioned Java Accessibility (a couple of megabytes), JavaFX (I counted 15 megabytes). Well and on trifles: JdbcOdbc, JavaWebStart Acivex Control, etc. Another 2 megabytes was found in jre / lib / fonts. Another 15 meters were found in jre / lib / jfxrt.jar (JavaFX classes). Another 4 meters - in Deploy.jar ...
- Another 27 MB in Oracle is occupied by VisualVM , a profiler that was ported several years ago from a NetBeans plugin into a separate application.
At this point, I realized that the difference in terms of file content is that Oracle JDK includes a bundle of proprietary technologies of its own, so it weighs a lot more and the comparison is not entirely correct. In this sense, it was necessary to compare the assemblies of Oracle JDK and OpenJDK under Ubuntu - it would be easier. Although since Zulu is now in its infancy, the expertise looks quite valid.
So, as a result: under the hood, we use different compilers for Windows (or at least different settings of one compiler) and several technologies from Oracle that are not needed by everyone and inflate the distribution. In order to overcome the latter problem,
Compact Profiles are implemented in Java SE 8. I understand that comparing two software on a set of files is a complete idiocy, and you need to dig further and run all this, measure with parrots, etc. But this is material for a technical article, not for a review. Considering, again, that Zulu is now at the initial stage, one can guess that the difference will be minimal.
Let's run it!
The first jar-nick that I came
across was
Dcompiler So,
java -jar ...
D:\>D:\zulu1.7.0_25-7.0.0.0-win64\bin\java.exe -jar DCompiler.jar
Exception in thread "main" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:208)
at java.awt.Window.(Window.java:535)
at java.awt.Frame.(Frame.java:420)
at java.awt.Frame.(Frame.java:385)
at javax.swing.JFrame.(JFrame.java:180)
at MainFrame.(MainFrame.java:253)
at Gui.create(Gui.java:18)
at Gui.main(Gui.java:49)
, Headless . , OpenJDK AWT Swing Zulu . IntelliJ IDEA . , , java.awt.headless=true :) :
D:\>D:\zulu1.7.0_25-7.0.0.0-win64\bin\java.exe -Djava.awt.headless=false -jar DCompiler.jar
- , Zulu. - Azul Systems Microsoft OpenJDK . , - JIT. , - Zing, Linux, ( ) Zulu.
Zulu Windows Azure, OpenJDK . ? ? . Zulu ? Zulu? , - Java- - . OpenJDK Windows x64. , , .
, Zing Zulu. Zing -- . Zulu, , , . Azul? ? - Zing Zulu? OpenJDK, , ? , . .
-- Java , JVM . ? ? ? - ? I/O ( ), ? , .
Joker 2013 , . , CTO Azul Systems Microsoft Java Windows Azure. .
at java.awt.Window.(Window.java:535)
at java.awt.Frame.(Frame.java:420)
at java.awt.Frame.(Frame.java:385)
at javax.swing.JFrame.(JFrame.java:180)
at MainFrame.(MainFrame.java:253)
at Gui.create(Gui.java:18)
at Gui.main(Gui.java:49)
, Headless . , OpenJDK AWT Swing Zulu . IntelliJ IDEA . , , java.awt.headless=true :) :
D:\>D:\zulu1.7.0_25-7.0.0.0-win64\bin\java.exe -Djava.awt.headless=false -jar DCompiler.jar
- , Zulu. - Azul Systems Microsoft OpenJDK . , - JIT. , - Zing, Linux, ( ) Zulu.
Zulu Windows Azure, OpenJDK . ? ? . Zulu ? Zulu? , - Java- - . OpenJDK Windows x64. , , .
, Zing Zulu. Zing -- . Zulu, , , . Azul? ? - Zing Zulu? OpenJDK, , ? , . .
-- Java , JVM . ? ? ? - ? I/O ( ), ? , .
Joker 2013 , . , CTO Azul Systems Microsoft Java Windows Azure. .
at java.awt.Window.(Window.java:535)
at java.awt.Frame.(Frame.java:420)
at java.awt.Frame.(Frame.java:385)
at javax.swing.JFrame.(JFrame.java:180)
at MainFrame.(MainFrame.java:253)
at Gui.create(Gui.java:18)
at Gui.main(Gui.java:49)
, Headless . , OpenJDK AWT Swing Zulu . IntelliJ IDEA . , , java.awt.headless=true :) :
D:\>D:\zulu1.7.0_25-7.0.0.0-win64\bin\java.exe -Djava.awt.headless=false -jar DCompiler.jar
- , Zulu. - Azul Systems Microsoft OpenJDK . , - JIT. , - Zing, Linux, ( ) Zulu.
Zulu Windows Azure, OpenJDK . ? ? . Zulu ? Zulu? , - Java- - . OpenJDK Windows x64. , , .
, Zing Zulu. Zing -- . Zulu, , , . Azul? ? - Zing Zulu? OpenJDK, , ? , . .
-- Java , JVM . ? ? ? - ? I/O ( ), ? , .
Joker 2013 , . , CTO Azul Systems Microsoft Java Windows Azure. .