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|

Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks! 

Training online: Threading Essentials course 

Java Performance Tuning

JProfiler
Get rid of your performance problems and memory leaks!


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!


Latest news

NEW: SEPTEMBER NEWSLETTER

AUGUST NEWSLETTER

JULY NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "I wholeheartedly support renaming 'non-functional requirements' to 'quality attributes'"
  • All the latest Java performance tips extracted in concise form
    • "Response time ranges challenges: seconds - easily achievable (small methods, minimize branching, use cohesion, abstract cleanly); hundreds of milliseconds - needs general performance tactics to achieve (as previous plus: optimized data structures, algorithm complexity minimized, use batching and caching); tens of milliseconds (low latency) - needs specific performance tactics to achieve (as previous plus: memory access patterns optimized for CPU caches, lock free algorithms, asynchronous processing, stateless, RamFS/TmpFS, GC and object lifecycle tuning); under 1 millisecond (ultra-low latency) - very specific techniques needed (as previous plus: thread affinity, NUMA, Large pages, avoid false sharing, data-oriented design, disable c-states, ensure CPU cache friendly operations)."

JUNE NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "Stateful scaling is much much harder than stateless scaling. Making your application stateless is hitting the scaling jackpot, it becomes just running multiple instances and routing requests. Stateful scaling involves distributed transactions, syncing caches, data routing, ... and much more"
  • All the latest Java performance tips extracted in concise form
    • "O(N) time complexity analyses tend to assume that: you can ignore constant factors; instructions have the same duration; memory doesn't matter; and instruction execution dominates performance. But on modern systems memory DOES matter and memory access can easily dominate over instruction execution. The processor can execute 300 instructions in the time it takes for data to be retrieved from main memory (RAM)."

MAY NEWSLETTER

APRIL NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "You need monitoring or you are blind to what is happening in your system. But monitoring only gets you the data, you need to use that data with analyses/thresholds/alerts/consoles/profiles to get full observability"
  • All the latest Java performance tips extracted in concise form
    • "For load distribution (by a coordinator), choosing the least busy server optimizes performance. But choosing the least busy server has a (coordination) cost, and this is limited by the Universal scalability law. At low parallelism coordination makes latency more predictable, but at high parallelism coordination degrades throughput. A compromise strategy is for the coordinator to choose 2 servers at random and then pick the least busy of the two"

MARCH NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "We're likely to see cloud infrastructure that hosts containers directly without the underlying VM, giving an extra efficiency to running in a container if you're cloud based - because the container has lower overhead than a cloud virtual machine, so you'll benefit with no real cost!"
  • All the latest Java performance tips extracted in concise form
    • "A docker image with the full JDK is around 0.5GB. With JDK9+ you can create custom JREs with just the subset of the JDK you need (jdeps tool helps identify which modules an application uses). A minimal JRE containing only the java.base module, eg ' jlink --module-path /docker-java-home/jmods --strip-debug --compress=2 --output java --add-modules java.base' with alpine linux and the musl-libc library in the image results in an image of less than 50MB in size (an order of magnitude smaller). (This is maintained in project Portola)"

FEBRUARY NEWSLETTER

JANUARY NEWSLETTER

DECEMBER NEWSLETTER

NOVEMBER NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "If you really do need to build thread-safety yourself, do it in an encapsulated way, eg with all the multi-threaded management of access and updates to your data structures hidden behind class APIs so that fixes can be applied internally with no need for the external users to have to change their usage"
  • All the latest Java performance tips extracted in concise form
    • "Caches losing a small percentage of data can mean a large increase in datstore load (eg 95% hit ratio dropping to ->90% means that DB load goes from 5%->10% - a doubling of load; the same 5% drop from 99.5%->94.5% means that DB load goes from 0.5%->5.5% - a 10x increase in DB load)"

OCTOBER NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "the problem with most asynchronous programming frameworks (Actors, Fork-join, etc) is that when you go to debug an issue, you get thrown into the framework rather than your use of the framework, and this makes debugging hugely more difficult than debugging synchronous execution"
  • All the latest Java performance tips extracted in concise form
    • "If building SoftReference cache (typically has values wrapped inside a SoftReference), Brian Goetz suggests instead wrapping the whole cache in a SoftReference, ie the whole whole cache is dumped under memory pressure - any elements with hard references outside the cache in the main app will stay anyway, and this frees up a lot more memory quickly"

SEPTEMBER NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "Encapsulate your data structures - this is best practice for coding, for maintenance, and performance (you make the underlying implementation more efficient without having to change anything in the rest of the application)."
  • All the latest Java performance tips extracted in concise form
    • "The four refinement zones (white green yellow red) affect how much work G1 needs to do to update queued pointer changes into the remembered sets. In the white zone, nothing is done (it's drained at the beginning of a GC); in the green zone -XX:G1ConcRefinementGreenZone refinement threads are activated to reduce the queue back to the white zone; in the yellow zone -XX:G1ConcRefinementYellowZone all refinement threads are fully active to reduce the queue; in the red zone -XX:G1ConcRefinementRedZone the application has to update the remembered sets on each pointer change which slows down the application until the queue is back into the yellow zone."

AUGUST NEWSLETTER

JULY NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "Seriously horizontally scaled applications monitor the performance of each virtual server and actually shutdown services when they detect sufficient contention for resources from competing virtual containers using the shared hardware"
  • All the latest Java performance tips extracted in concise form
    • "Inner classes need to have access to their outer class - if the inner class instance continues to be live when the outer class instance is completed, the outer class instance will be kept alive leading to a possible memory leak. One possible solution is to hold the outer class reference in a weak reference. "

JUNE NEWSLETTER

MAY NEWSLETTER

APRIL NEWSLETTER

MARCH NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "If you really want to have memory-pressure sensitive cache, encapsulate your preferred cache and add separate functionality which detects memory pressure with SoftReference instance just for that"
  • All the latest Java performance tips extracted in concise form
    • "Typical tuning options at the CPU level include: reduce the number of instructions needed to execute the algorithm; change the data structure to reduce memory stalls (waiting for memory); change the program logic to reduce branch stalls (eg from mispredicted branches); change the order of operations so that they execute in parallel across the cores more easily (if in a loop each subsequent operation depends on the result of the last one, this is difficult); breakdown long latency operations into multiple simpler ones"

FEBRUARY NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "Getting a heap dump is straightforward, you can use any of jmap; the JMX com.sun.management.HotSpotDiagnostic.dumpHeap() method (from any JMX aware tool, such as jconsole); the -XX:+HeapDumpOnOutOfMemoryError flag (which does what it says); and jcmd [PID] GC.heap_dump [PATH_TO_DUMPFILE]"
  • All the latest Java performance tips extracted in concise form
    • "jvmstat includes several hundred indicators covering nearly all JVM areas: class loading, garbage collection, multithreading, just-in-time compilation, etc. jvmstat counters are free - Java HotSpot VM exports them anyway, whether you read them or not, in the file system as a memory-mapped file in a temporary directory, by default /tmp/hsperfdata_{user}/{pid}, where {pid} is the JVM process ID"

JANUARY NEWSLETTER

Previous newsletters

All our previous newsletters can be viewed from here

How to use this site

This site has four main information resources:

  • The uncategorized tips page lists many other web pages with Java performance tuning related information. Each web page has its performance tuning tips extracted and listed immediately after the URL is listed. These tips are being categorized, and the tips page links to those categories currently available. If the performance area you are interested in is not yet categorized, send us an email from this page telling us the categorization you'd like to see. In any of the tips pages, use your browser's "find" or "search" option to identify particular tips you are interested in on the page, and follow up by reading the referenced web page if necessary or desired.
  • The resources page lists Java performance tuning resources including books, tools, reports, other performance tuning sites of interest, and Java performance tuning discussion groups.
  • The news pages are monthly newsletters listing any new Java performance tuning related information, together with Kirk Pepperdine's discussion group roundup and Javva The Hutt.
  • The tool reports pages are detailed introductory reports on various Java performance related tools, for both free and commercial tools.


This site has been designed to download almost as fast as possible. (Some stylistic markup and required server-side processing has been used in preference to absolute speed contraints.) The web tree contains very few graphics and almost no complex typesetting markup except for very simple tables, and the main pages can be accessed directly from the menu.

This line is only to help search engines: Java performance tuning Java tuning Java optimization Java optimize Java optimizing Java fast Java faster Java speedup Java performance Java High-Performance


Last Updated: 2018-09-22
Copyright © 2000-2018 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/index.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us