Ali heavyweight open source Dragonwell JDK release GA version: the production environment Available

In March this year, Alibaba heavy long-term support OpenJDK open source version of Alibaba Dragonwell news in a very long period of time are the focus of discussion developer of the project on Github number Star quickly break through 1400. Recently, Dragonwell JDK 8.0.0 GA version released, which means that it already has the ability to run in a production environment official.


March 2019, Dragonwell JDK officially open source, released a preview (Preview) version. Recently, Alibaba announced heavy Dragonwell JDK 8.0.0-GA released, which means Dragonwell JDK been fully equipped with the ability to run in a production environment. In the past three months, Dragonwell received a lot of feedback from community members. So, this time to release the GA version which added new features? What does it mean for developers who?

The new change of Longjing 8.0.0-GA

Work purposes 8.0.0-GA is to make Dragonwell can be used in a production environment as soon as possible. In this version, we synchronize the upstream OpenJDK community the latest updates jdk8u212-b04, which also means that we synchronize upstream latest security updates and patches.

In addition to synchronizing upstream, Dragonwell8 also fixes some some very important Bug found in Alibaba Java scene and withstood the test of Alibaba internal scene. We also provide a default security certificate, which we will update and maintain.

Familiar Dragonwell little friends may know, Dragonwell compared to upstream and OpenJDK provides some exclusive features such as: JFR, JWarmUp and so on. These properties within Alibaba has been widely used, has achieved a lot for the stable operation of Alibaba's Java business, it can be said Dragonwell of unique weapons. In 8.0.0-GA, we made some improvements and fixes compatibility properties for JFR. So like Dragonwell new features of the small community of partners who can safely use them. We firmly believe that these new features can not only bring value to Alibaba, but also give Java community to bring ecological value.

Specific content 8.0.0-GA release github you can refer to the release notes, poke here

Longjing new journey

Introduction to new changes in Longjing 8.0.0-GA, many small partners have been eager. Hold on, before we use two more chatter as Longjing family, the baby how to grow, we have a lot of ideas, but Longjing children of the community, but we also very much hope that small community partners to help them change growing up. So we talk with those Longjing may change in the future.

Since the beginning of the birth of Longjing, it attracted the attention of the community, especially Dragonwell JDK of new features to help users have more choices in the face of business challenges. In ISCA2019 Runtimes this year in the Cloud Tutorial, we reported on the progress of work on Dragonwell new features to the community and academia, we also got a positive response. Dynamic community feedback is our next step, we hope small partners give advice. This talk introduces here www.cs.utah.edu/cloudruntim... PPT download from here www.cs.utah.edu/cloudruntim...
interested partners can look small.

Several features Dragonwell currently exist are tested Java Alibaba huge scene in the stability is very reliable. Here we come to talk specifically about these properties.

JWarmUp

JWarmUp This feature is to resolve the dual 11 scene Alibaba's buying scene Java System Warmup pain points. Ordinary Java application, for example, JVM needs to find hot spots through interpretive execution (interpreter), and then run the hot method to speed through the JIT compiler. For high concurrency scenarios, after the application is started there will be a long time in looking for hot spots, hot spots compiled state, then a lot of performance (CPU usage, TPS throughput, RT response time) is not ideal. In other words, when a Java application to start and provide service for a long period of time, in a state of Warmup, this time though Java can provide services, but the quality of service is relatively poor, if the user at this stage concurrency is relatively high, then it often leads to quality of service degradation and even service crashes.


To optimize this process, it is common industry practice will be introduced to "warm up" (Warmup) after this step in Java started by man-made import some data to allow the application of heat in advance, before the warm-up is completed, the user's request is not controlled by the network it is sent to the Java process, it opens a flow restriction after the warm-up is completed so that Java actually provide services. This approach can be partially mitigate these problems, but this program there will be some limitations in many scenes, this is because in many cases, to obtain a high-quality pre-data is very difficult. The correctness of the data directly affects the warm-up warm-up effect, in line with the actual situation compile data can improve the quality of, if not, sometimes it will have a negative effect, such as a common situation will miss the warm-up Some important method is not called. Worse situation is due to the actual situation and due to inconsistent JVM "retreat optimization" compiled method, the compiler restarts, but worsened the situation. Thus, how to prepare warm-up data is actually a very complex issue, in actual operation and maintenance there is no good solution.

Dragonwell proposed JWarmup technology from the JVM level to address this pain point, the basic principle is the case run before using the method and find hot java class information, run the JVM instance can use the following information to the last warm-up, you do not need to artificially data preheating. Examples of collection of hot spots can have a variety of options, such as selecting a node in a cluster application, you can choose a beta release stage in the publishing process to collect. Compared to the previous way of "human data", there are several advantages:

  1. When collecting hot spot with real data, compiled achieve better results.
  2. Accelerate the process of preheating. Since the method of hot spots can be compiled directly after loading, saving interpreted, Profiling and other processes.

This feature specjvm2008 benchmarks, for some test cases, running club has improved significantly:

# 标准OpenJDK在specjvm2008的xml.validation测试用例上的跑分
Score on xml.validation: 268.07 ops/m
# Dragonwell在specjvm2008的xml.validation测试用例上的跑分
Score on xml.validation: 294.95 ops/m复制代码

It can be seen running points xml.validation Dragonwell be increased from 268.07 ops / m to 294.95 ops / m, about a 10% increase.

This feature has been validated in a large number of dual-11 buy Alibaba scene can be said to be the secret weapon Dragonwell. Currently we are also trying to promote the community, hopes JEP way to put this feature to advance to the upstream OpenJDK community. After all, useful things, not only we have our own, we have to common prosperity is king. This community is currently JEP Draft review stage, the junior partner if you feel this feature is easy to use, you can also OpenJDK mailing list community in China on behalf of developers to Dragonwell sound.

JFR

JFR full name is Java Flight Recorder (Java flight recorders), is a feature of Dragonwell. When this function is turned on, JVM can record various processes running Java run-time generated data in a very small performance overhead. JFR comprise various data generated microscopic details JVM runtime, can be analyzed JMC (Java Mission Control). JMC is a desktop application, by analyzing the data JFR, JMC can be rapid and efficient targeting various fault line production environment. It can analyze memory allocation hot spots, hot spots method calls, method calls timeout analysis, all aspects of a memory leak, IO activity, threads and other activities to help ensure the stability of Java user service.

Alibaba lot of problems encountered in the daily development process is by JFR be resolved, it can be a tool for troubleshooting Java. JFR this feature OpenJDK 11 and above versions only. In efforts to promote Alibaba, JFR function OpenJDK community has begun to be accepted into the program OpenJDK 8u main line, currently being incubator transplant community work in progress nervous branch, in the near future, the entire OpenJDK 8 downstream ecosystems can enjoy the results of the work.

Dragonwell JFR as participants in community work OpenJDK 8u, would be a steady stream of the latest work product of JFR timely introduction Dragonwell, Dragonwell users can say blessed. In addition to existing features JFR community, Dragonwell on JFR also made a number of enhancements and innovation, on the one hand we will actively put these new features JFR feedback to the upstream OpenJDK community, while at the same time pushing upstream, Dragonwell users We will naturally enjoy some special benefits: before accepting these features in upstream communities, Dragonwell these new features will be the first open source.

Mystery guest: ElasticHeap

Finally, we should introduce our surprise guest ElasticHeap up. Dragonwell will be an endless stream of innovative features within the Alibaba back to the community, ElasticHeap is following the JFR, JWarmUp, Dragonwell with full sincerity plan to open a third new feature (go to the next release), OpenJDK Community also I did not oh.

As we all know, Java as a high-level language will be with the garbage collector, along with running the program, Java users will use the configured memory gradually all out. Even if it later becomes more free Java process does not require so many resources, and that these are occupied out of memory and will not be returned to the operating system, from the perspective of resource utilization, which will bring a sense of waste. The Dragonwell of ElasticHeap to change this situation, which is based on a dynamic G1 GC heap resilient and elastic features, it can effectively save java process actual physical memory footprint. Openjdk8 only supports the return of physical memory in accordance with certain rules when Full GC. The Dragonwell of ElasticHeap provide a more agile and effective way to return the memory, it has the following characteristics:

  1. Full GC and does not rely on other STW heap on hold elastic stretch, no additional overhead STW does not affect Java threading services.
    2. Support multiple modes.
    a. adaptively adjusted according to the size of the heap memory allocation GC and velocity pressure (automatic return memory)
    B. (stack limit settable limit or generational) according jcmd / MXBean active command limits the size of the heap

The figure is applied Alibaba FIG monitoring electricity supplier pressure applications using ElasticHeap GC dual stack 11 adaptively adjusted


  1. The upper half of the figure as CPU usage, memory usage lower half of physical
  2. Dual 11 whole point came when the service traffic (traffic peak starts), CPU utilization increased significantly
  3. At the same time open ElasticHeap heap memory Adaptive adjustment will increase the pressure with the GC heap memory back up quickly; the flow CPU utilization receded smaller, GC pressure after smaller, rapid return of physical memory
  4. In the present embodiment, the return of the physical memory at low flows of about 20-30%

You little friends, please look forward to it, ElasticHeap will be unveiled in the next version of the publication.

Installation

Alibaba Dragonwell currently only supports Linux x86-64 platform, developers can use Alibaba Dragonwell through the following steps.

Installation Alibaba Dragonwell

  1. Option 1: Download pre-compiled binary packages Dragonwell
  • Download the binary package tar, links from Github page Alibaba Dragonwell of github.com/alibaba/dra...
  • The downloaded tar package to extract a target installation directory
  1. Option 2: Use YUM installation tool

Alibaba Cloud Linux 2 YUM warehouse has officially support Alibaba Dragonwell JDK, the YUM warehouse and Aliyun Linux 17.1, Red Hat Enterprise Linux 7 and Centos 7 is fully compatible.

For Alibaba Cloud Linux 2 operating system, users only need to perform sudo yum install -y java-1.8.0-alibaba-dragonwellcan be successfully installed.

If you do not use Alibaba Cloud Linux 2, but Linux distributions use and Alibaba Cloud Linux 2 YUM warehouse compatible, then yum installyou need to manually install prior to adding Alibaba Cloud Linux 2 YUM YUM warehouse source operating system to go. Add method is very simple, just add alilinux-plus.repo a file to include the following in /etc/yum.repos.d/ years.

# plus packages provided by Aliyun Linux dev team
[plus]
name=AliYun-2.1903 - Plus - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/alinux/2.1903/plus/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/alinux/RPM-GPG-KEY-ALIYUN复制代码

Alibaba Dragonwell enabled for Java applications

For JDK Dragonwell user precompiled binary packages, or simply use scripting environment variable JDK directory variable (usually JAVA_HOME) Alibaba Dragonwell directory points to the previous step of installation. Then, restart the application to use Alibaba Dragonwell JDK configuration.

If the user is through the tool mounting YUM Dragonwell JDK, YUM JDK will be prompted to use during the installation process, it prompts as follows

=======================================================================
Alibaba Dragonwell is installed to:
    /opt/alibaba/java-1.8.0-alibaba-dragonwell-8.0.0.212.b04-1.al7
You can set Alibaba Dragonwell as default JDK by exporting the
following ENV VARs:
$ export JAVA_HOME=/opt/alibaba/java-1.8.0-alibaba-dragonwell-8.0.0.212.b04-1.al7
$ export PATH=${JAVA_HOME}/bin:$PATH
=======================================================================
复制代码

to sum up

Longjing 8.0.0-GA release declaring Dragonwell entered a new journey, more and more new features will be open source. I hope a lot of support for small community partners, Longjing JDK will be together, to enhance the strength of the domestic Java ecosystem efforts throughout China and Java developers, so that the sound development of China's been listening all over the world.


Author: a green boat

Description link

This article Yunqi community original content may not be reproduced without permission.


Guess you like

Origin juejin.im/post/5d301e78e51d455cd73ba149