[Reprint] Ali JDK warm warmup process

Warm warmup process

https://blog.csdn.net/feelwing1314/article/details/80359785

Today, the group of small partners HUANG Xiao-feng VIVO consulting the question: "how do dubbo Interface preheat it every time on the line, there will be a small part of the overtime?", Familiar with the JVM knows that there is a warm-up after the restart JVM to run for some time its performance in order to achieve the best condition; Ali JVM team has been optimized for this defect, its characteristics is called: jwarmup, you can click on Alibaba JVM innovation and Improve efficiency by the international community will be recognized on stage JVM Quanding of jwarmup little understanding; 

You stupid fake probably learned jwarmup principle: for the last JIT optimization applications, the initiative to trigger JIT compiler optimization, rather than waiting jvm running for some time to perceive yourself!

Introduction alijdk aid JITWarmup

JVM when the application starts because there is no full participation jit, the performance did not reach the optimal state, while continually recompiled in the process, optimization. Resource-intensive than non-working threads make in

A sudden increase in load start-up phase, many times we will use a hierarchical compilation to solve. But after stratification compiled enabled, c1 of cacheocde take up a lot of space, it will cause problems jvm crash. (Http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8006952)

Now alijdk have an auxiliary tool JITWarmup, you can use it once on the record (preferably beta release) run-time information is compiled method name, class initialization sequence, such as the number of executions in the next

Start (released) when reading the information, then the corresponding method JIT.

 

The figure (1) the early start, when the application does not provide services, that is, did not end when jvm start, so this does not affect peak service (start time may be extended). But behind the blue line is the original start time of the cpu load, has been among about high 70s, the red line is a high-ranking cpu case after use JITWarmup, quickly down. The effect is very obvious.

JitWarmUp officially changed its name to JWarmup built as AJDK module.

JWarmup is a new feature (Preview) AJDK-8.1.1 introduced, formerly known as JitWarmUp, officially released (recommended AJDK8.2.4_fp1 or higher) in the AJDK-8.2.3. By compiling the information recorded on the first run when the Java application to a file, the next time you launch the application, read the file, so before the flow came in ahead of schedule loaded, initialization method and compiled classes, skipping interpretation stage, direct execute compiled native code, to avoid side interpreted the side background compiler and CPU load caused soared high, rt overtime and other issues.

 

Guess you like

Origin www.cnblogs.com/jinanxiaolaohu/p/11614819.html