📜 ⬆️ ⬇️

Performance and multithreading at the JPoint 2016 Java Conference



Only 8 weeks are left until the largest Java-conference in Russia, JPoint 2016. I have already told you about what awaits us:


I will try to slowly tell you about the main topics of the JPoint and start with our favorite - performance and multithreading .

The following reports have already been announced on this topic:

')





Alexey Shipilev, Oracle - If Not Unsafe, Then Who: Sunrise VarHandles

shipilev
Alexey has been working on Java performance for about 10 years. During this time, he managed to work on Apache Harmony at Intel, then went to Sun Microsystems, and then to Oracle, where he is working on the Sun / Oracle JDK today, mainly on changes related to JVM performance, class libraries, frameworks, and applications. Develops and supports OpenJDK sub-projects: JMH, jcstress, JOL. Works in expert groups related to the formalization, testing and performance of concurrency.

Alexey spoke at the JPoint many times, and last year he tore everyone to shreds .

image

This report will provide an overview of the work around VarHandles ( JEP 193 ): what is behind the API, how does the reference implementation work in a large cell, what new access modes (acquire / release, opaque / relaxed, compareAndSet / compareAndExchange) does it give, and how do we We manage to compile it into almost bare accesses.

In addition, we will take a look at what kind of sun.misc.Unsafe is bad, what kind of rake does the current JDK / JVM put on us, what hardware problems are undermining the beautiful implementation granite. On the positive side, we’ll see side improvements in JDK / JVM: optimizations in ByteBuffers, Atomic * FieldUpdaters, and other general code-generation enhancements.




Ruslan Cheremin, Deutsche Bank - Escape Analysis and scalarization

cheremin
Ruslan has long been engaged in the performance of Java solutions and maintains a popular blog about Performance , which is constantly referenced by everyone who in one way or another is engaged in performance in the Russian-speaking world. If you are interested in a Javas performance and you are not yet subscribed to Ruslan’s blog, you’ll subscribe. Well, read it right next weekend - a brain explosion is guaranteed!

And by the way, Ruslan already spoke at the JPoint and JUG three years ago. Here is a video of his report about Disruptor:



Now about the current report.

Escape analysis and Scalar replacement appeared in Java as early as version 6.0, and their inclusion does noticeably reduce the load on the GC. But a reliable understanding of which specific areas of the code can be relied on for scalarization, and which parts cannot be relied upon, Ruslan has not developed over the years. You can find a lot of success stories in the network in the spirit of “but in this code there are absolutely, absolutely no allocations!”, But the given code often turns out to be very fragile: sometimes it is enough to fix one or two lines, as all magic disappears.

The report is an attempt to bring more insight to this question. The escape analysis algorithm itself and its inherent limitations will be briefly described, and examples of its implementation in HotSpot JVM JIT will be discussed.




Vladimir Sitnikov, NetCracker - Well, the performance of your OpenSource!

sitnikov
Vladimir has been working more than 10 years on the performance and scalability of NetCracker OS — the software used by telecom operators to automate network management processes and network equipment. He is interested in Java and Oracle Database performance issues. Author of over a dozen performance improvements in the official PostgreSQL JDBC driver .

image

Public programs and libraries are captivating their free. If the source code is open, then everyone immediately thinks that "smart guys have already fixed everything they need." In practice, it turns out that the rakes are laid out where few people are waiting for them. It slows down everything except, perhaps, java itself. In the report we will look at examples of performance problems when using such libraries as Wildfly, Spring, HornetQ, pgjdbc.

For example, it turns out that spring.getBean slows down, and in combination with autoproxy it can take up to 50% of the application time altogether. Cglib prevents garbage collectors from trying to proxy Object # finalize, and HornetQ suddenly slows down sending JMS, which easily leads to 5 second delays per message. Vladimir will tell how to identify and neutralize them.




Sergey Kuksenko, Oracle - Quantum Performance Effects, level up. Outside the core

kuksenko
Sergey - Java Performance Engineer, working with Java since version 1.0. During this time, managed to participate in the development of mobile, client, server applications, as well as virtual machines. Java has been engaged in productivity for more than 10 years: first it worked at Intel on Apache Harmony, and at the moment Oracle is engaged in the performance of OracleJDK / OpenJDK (its 3rd JVM).

Sergey will make a report that will be a continuation of his previous hardcore report about Quantum Performance Effects. Details will be from day to day, but for now - here's a video of the first part:






Alexey Shipilev, Oracle - The Lord of the Strings: Two Scours

shipilev

java.lang.String is one of the most commonly used classes in Java applications. Not surprisingly, Oracle engineers are trying to improve it with micro and macro optimizations. The report will highlight the issues of rationality, approaches to implementation, practical rakes faced by JDK developers trying not to break anything in a huge ecosystem, as well as what this undercover activity threatens to ordinary users.

This report will look at two future features in JDK 9 aimed at optimizing strings: Compact Strings, compressing strings with single-byte characters, which improves the footprint and even overall performance; and Indify String Concat, which uses invokedynamic magic for string concatenation, allowing you to hook up the concatenation implementation without recompiling programs.




Tagir Valeev - Stream API puzzlers

valeev
On Habr Tagir is known as lany , the leader of the Java hub, and this alone makes him a good advertisement :) Tagir develops and supports automation systems for scientific research in the field of genetics, molecular and system biology. Participates in the project of static code analysis FindBugs . Develops the open source library StreamEx , extending the capabilities of the Java 8 Stream API. He lectures on computer graphics at NSU.

At various conferences there were many reports on what the Stream API is and how to use it. In the report we will focus on implementation details: which operations are performed quickly, which slowly, which unexpectedly eat a lot of memory, which simply behave strangely. It will be analyzed what bugs are in the Java 8 Stream API and what will be fixed in Java 9. In addition, it will be shown how to solve some non-trivial tasks. And, of course, there will be a bit of advertising for the StreamEx OpenSource library.




Vladimir Ivanov, Oracle - Native Code, Off-heap Data and Java

ivanov
Vladimir is a leading Oracle engineer, working in the HotSpot Java Virtual Machine Development Team. Specializes in JIT compilation and support for alternative languages ​​on the Java platform. Working on the creation of new mechanisms for working with native code and off-heap data ( Project Panama ).

Vladimir’s reports are usually furious. The previous review of new products in JVM Vladimir did a year and a half ago on Joker 2014:



What will Vladimir tell about this time?

Working with native code and off-heap data from Java is attractive, but fraught with a number of difficulties. The talk will be about existing methods of interacting with native code and how to work with off-heap data. A significant part of the report will be devoted to the story of the innovations in JDK 9 ( JEP 193: VarHandles ) and what is planned for the longer term in Project Panama: a new interface for accessing native code that replaces JNI ( JEP 191: Foreign Function Interface ), Layout Descriptor Language (LDL) and Arrays 2.0.




Vladimir Ozerov, GridGain - (Almost) non-blocking synchronization

ozerov
Vladimir is the architect of GridGain. Commer and PMC member of the Apache Ignite project. Deals with issues of distributed computing, caching and replication, integration with .NET / C ++, development of modules for the Hadoop ecosystem.

Non-blocking synchronization is a useful and powerful tool for multi-threaded programming. But often the knowledge of the developers about it is limited to the words "cool", "difficult" and "performance". How exactly to use non-blocking algorithms in practice? How specifically can they help javista? And where is that performance hidden?

The report will address the problems solved by non-blocking synchronization in the Java world. Together with Vladimir listeners





Volker Simonis, SAP - HotSpot Intrinsics

simonis
Volker is a JVM engineer with vast experience working on SAP JVM. He has been an OpenJDK contributor since its inception and helps SAP make various improvements to the HotSpot JVM. Volker heads the OpenJDK porting project to PowerPC / AIX, commits to JDK8 and reviews commits to JDK9.

In the past, JPoint Volker talked about various approaches to accelerating work with arrays of objects:



This time, Volker will tell you about JVM Intrinsics - special functions inside HotSpot and other JVMs that allow your code to run faster. As we know, HotSpot JVM runs on a huge number of platforms, and therefore all its code is more or less divided into common and specific for a specific hardware or a specific OS (and sometimes for a pair of hardware + OS). Accordingly, in some cases, the executable code can be accelerated by using special processor instructions. A typical example is to use for the methods of the AtomicInteger.getAndAdd (int) type the lock add type instead of the CAS loop. Or, for example, use SIMD instructions for the equals and hashCode methods on strings.

This report will give an overview of intrinsics existing in HotSpot and will explain how they are implemented, how to control their use and, finally, how you can add intrinsic to your favorite Java method.




It is likely that in the next few days we will have a couple of reports on Performance - one from Sergey Kuksenko, and the second from Concurrency-expert and Java Champion, Roman Elizarov. In addition, a number of reports are very closely related to the performance:


You can read these and other reports here .

Well, in the comments, I, as always, am waiting for your questions on these reports or even about the JPoint.

Source: https://habr.com/ru/post/278001/


All Articles