Java Performance Tuning

Java(TM) - see bottom of page

|home |services |training |newsletter |tuning tips |tool reports |articles |resources |about us |site map |contact us |
Tools: | GC log analysers| Multi-tenancy tools| Books| SizeOf| Thread analysers| Heap dump analysers|

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 April 2016

JProfiler
Get rid of your performance problems and memory leaks!

Modern Garbage Collection Tuning
Shows tuning flow chart for GC tuning


Java Performance Training Courses
COURSES AVAILABLE NOW. We can provide training courses to handle all your Java performance needs

Java Performance Tuning, 2nd ed
The classic and most comprehensive book on tuning Java

Java Performance Tuning Newsletter
Your source of Java performance news. Subscribe now!
Enter email:


Training online
Threading Essentials course


JProfiler
Get rid of your performance problems and memory leaks!


Back to newsletter 185 contents

"Better, faster, cheaper - pick two, because you can't have all three". This is an old saying which is almost always true. In performance tuning, it turns into "Smaller, faster, higher throughput - pick two, because you can't have all three". Again it's almost always true.

A note from this newsletter's sponsor

New Relic - Try New Relic today and get your free Data Nerd shirt!
Free SaaS APM tool to monitor, troubleshoot, and tune apps
running on Websphere, Weblogic, Tomcat, Jetty, JBoss, Solr, Resin

There are a couple of situations when you can improve all three. The most obvious is when you're just clearly doing it wrong, like using the wrong data structure: eg if you're storing ints into a HashMap, they're being converted to and from Integers (either explicitly or through autoboxing). Changing the code to use the appropriate trove map (TObjectIntHashMap, TIntObjectHashMap or TIntIntHashMap) gives you a smaller, faster, and higher throughput implementation, at almost no effort. The fabled super low-hanging fruit!

The other situation is where you find that most of the time things are done one way, and you can optimise for that common case making almost everything better (typically leaving a fallback path for the "old" way for those rare cases when that is still better). The HotSpot compiler does this with speculatively choosing a branch for the JIT compiled code based on the current runtime, with a de-optimisation fallback exception path (where it has to recompile the code). Garbage analysts noticed that most objects die young and so split the garbage collector into a young generation collector which is faster but not as thorough, and old generation collector which is slow but thorough. These situations result in smaller, faster, and higher throughput, but it takes a huge amount of effort to get there.

For JDK 9, Oracle has targeted improving String in this way. Analysis of String indicates that most Strings are ascii, so Oracle have changed String to use a byte array instead of a char array. To make this work efficiently without impacting String performance across all it's uses, took 5 man years to achieve. In the news items, you can find Aleksey Shipilėv's fascinating talk about exactly why it took so much effort.

Now on to our usual links to tools, articles, news, talks and as ever, all the extracted tips from all of this month's referenced articles.

A note from this newsletter's sponsor

Developers wanted in London - We're working on IoT, big data, highly
concurrent high througput 24/7/365 systems, some real-time, needing
total fault tolerance and global distribution. Apply now!

News

Java performance tuning related news.

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 185 contents


Last Updated: 2024-02-27
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/news185.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us