Java Performance Tuning
Java(TM) - see bottom of page
Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks!
Training online: Concurrency, Threading, GC, Advanced Java and more ...
News September 2016
JProfiler
|
Get rid of your performance problems and memory leaks!
|
JProfiler
|
Get rid of your performance problems and memory leaks!
|
|
|
Back to newsletter 190 contents
Thanks to a nice slide from Azul's Ivan Krylov, I have listed all the
JEPs that have performance impact in Java 9. There are lots of low-,
feature-, and high-level changes. Starting at the low-level, there's:
better contention management - 143; sharing interned Strings across
JVMs running G1 - 250; restructured code cache (with some new tuning
flags) - 230; faster cryptography using recently available CPU
instructions - 246; denser strings - 254; and moving String
concatentation optimization from compile-time to runtime - 280.
A note from this newsletter's sponsor
New Relic - Try New Relic today and get your free Data Nerd shirt!
Free SaaS APMto monitor, troubleshoot, and tune apps
running on Websphere, Weblogic, Tomcat, Jetty, JBoss, Solr, Resin
At the new feature level we have a JIT-C plugin capability - 243 -
yes, you can now replace hotspot with your own compiler! JMH with a
benchmark suite is included so you can run benchmarks to compare
versions - 230. jcmd will now be able to alter some fine-grained JIT
compiler directives at runtime, and of course you can define them
statically at startup - 165, this may be particularly useful for
those low latency applications with warmup concerns.
At the high level we have Flow* Reactive Streams interfaces - 266
(Flow.Processor, Flow.Publisher, Flow.Subscriber, Flow.Subscription);
we have convenience collection factories for creating (immutable)
collections - 269, you can now write List l = List.of(a, b, c)
or
Map m = Map.of(k1, v1, k2, v2)
, letting you create your collection
in a nice easily readable format and also getting a more efficient
form because knowing they're immutable means a specialized data
structure can be used. It's not minimal perfect hashing yet, but
that's doable. And finally, java.lang.invoke.VarHandle
gives you
properly supported access to capabilities that were previously
restricted to sun.misc.Unsafe
. This is likely to be the most
far-reaching change, with libraries that previously shied away from
hacking sun.misc.Unsafe, now converting to use VarHandles. Look at the
JEP or VarHandle if you want more detail.
Now on to those JEP links, our usual links to tools, articles, news,
talks, blogs. And if you need the tips from this month's articles and
talks, as ever they are extracted into
this month's tips page.
News
Java performance tuning related news.
- Change the javac compiler's generation of concatenated Strings so that the JVM runtime will optimize them rather than have the compiler try to optimize them
- Convenience collection factories - space efficient and fully immutable so totally thread-safe
- Concurrency library improvements: Reactive Streams interfaces and classes Flow and SubmissionPublisher, enhancements to the CompletableFuture, other small enhancements, fixes to docs
- Strings will use a byte array(as explained in my April newsletter)
- G1 will be able to share interned Strings across JVMs on the same machine, reducing overall memory use if there are multiple JVMs
- Use newly available CPU instructions to improve the performance of some cryptographic functions
- New JVM compiler interface JVMCI which lets the JVM plugin a dynamic compiler (AOT, JIT, whatever) - will need -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -Djvmci.Compiler=<name of compiler>
- A benchmark suite will be included with the JVM
- Restructure the code cache to improve performance, adding new flags XX:NonProfiledCodeHeapSize: -XX:ProfiledCodeHeapSize: -XX:NonMethodCodeHeapSize:
- Runtime alterable fine-grained JIT compiler directives, adjustable with jcmd
- Improve performance of contended locking related to monitor entry/exit/notify/notifyAll, PlatformEvent::unpark(), field reordering and cache line alignment. And fix bugs
- Make public some sun.misc.Unsafe equivalent atomic operations in java.lang.invoke.VarHandle
Tools
Java performance tuning related tools.
A note from this newsletter's sponsor
Site24x7.com : Deep dive Application Performance Monitoring
Fix performance issues with Java, .NET and Ruby platforms
Monitor app instance at $12/Month. 30-day free trial. Sign Up!
Articles
Jack Shirazi
Back to newsletter 190 contents
Last Updated: 2024-10-29
Copyright © 2000-2024 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. JavaPerformanceTuning.com is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
URL: http://www.JavaPerformanceTuning.com/news/news190.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us