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 ... 

Java Performance Tuning

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!


Latest news

NEW: MARCH 2024 NEWSLETTER

FEBRUARY 2024 NEWSLETTER

JANUARY 2024 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "For concurrent updates Hashtable.size() is strictly consistent, ConcurrentHashMap.size() is eventually consistent"
  • All the latest Java performance tips extracted in concise form
    • "Because garbage collection costs across an entire organization is hugely significant and garbage collection cost tends to be dominated by memory requirements and pressure, memory profiling and tuning actually reduces costs across the board as reduced memory pressure translates directly to reduced garbage collection which translates directly to reduced CPU! A lot of high-performance Java dev have become experts at avoiding allocations altogether for exactly this reason"

DECEMBER 2023 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "Eventual consistency has become the more popular mechanism because of the lower latency of data access"
  • All the latest Java performance tips extracted in concise form
    • "Selecting the right garbage collector is crucial for optimizing application performance: Serial GC for small applications with low memory footprint and low CPU requirements, but not suitable for low-latency applications due to longer GC pauses; Parallel GC (Throughput Collector) for maximizing application throughput by utilizing multiple threads for garbage collection but also not suitable for low-latency applications due to significant GC pauses; CMS (Concurrent Mark Sweep) designed to minimize pause times by working concurrently with application threads, has lower pause times but suffers from fragmentation ultimately giving long pauses; G1 (Garbage-First Collector) tries to provide a good balance between throughput and pause times, but doesn't give the lowest pause times; ZGC (Z Garbage Collector) and Shenandoah designed for low-latency applications, aiming to achieve pause times of less than 10ms, even on large heaps"

NOVEMBER 2023 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "The full process data structure of the JVM is dramatically different depending on which GC algorithm is chosen"
  • All the latest Java performance tips extracted in concise form
    • "Common cache invalidation algorithms: Time-based after a certain period of time; Version-based whenever version changes; Delta-based - compare the current version with the latest version and invalidate if the delta between the two exceeds a certain threshold; Least Recently Used (LRU) - the item not accessed for the longest time is evicted from the cache; Least Frequently Used (LFU) - the item accessed the least is evicted from the cache. Of course caches can combine multiple algorithms"

OCTOBER 2023 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "Most JVM tuning changes needed in production are garbage collection related changes"
  • All the latest Java performance tips extracted in concise form
    • "Testing gotchas: testing once is jittery and un-representative, interpreted code behaves very differently from compiled JIT optimized code, System.currentTimeMillis() can go backwards (eg from NTP), JVM code and branch elimination can give unrepresentative performance for unrepresentative data and workloads, testing on different platforms can give very different (unrepresentative) results, power saving modes can give unrepresentative results, having other processes running at the same time can give unrepresentative results."

SEPTEMBER 2023 NEWSLETTER

AUGUST 2023 NEWSLETTER

JULY 2023 NEWSLETTER

JUNE 2023 NEWSLETTER

MAY 2023 NEWSLETTER

APRIL 2023 NEWSLETTER

MARCH 2023 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "The new 4GLs aren't new languages, they are 3GLs together with intelligent IDEs"
  • All the latest Java performance tips extracted in concise form
    • "Strategies to prevent deadlocks: always acquire locks in a fixed order; avoid holding locks for extended periods; reduce the scope of the lock holding code block; use ReentrantLock and similar concurrent lock classes to manage locks, eg using tryLock() to acquire locks without blocking; use timeouts when acquiring locks to prevent threads from waiting indefinitely; use non-blocking algorithms and data structures to avoid deadlocks altogether"

FEBRUARY 2023 NEWSLETTER

JANUARY 2023 NEWSLETTER

DECEMBER 2022 NEWSLETTER

NOVEMBER 2022 NEWSLETTER

OCTOBER 2022 NEWSLETTER

SEPTEMBER 2022 NEWSLETTER

AUGUST 2022 NEWSLETTER

JULY 2022 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "DO optimize some things early - re-architecting your application is very expensive and effortful, especially when some thought at the beginning of the project let's you avoid having to make costly optimizations later"
  • All the latest Java performance tips extracted in concise form
    • "A common mistake for micro performance optimizations is not preventing the system from having the same performance degradation in the future after maintenance changes. A complete fix would require regression tests that prevent the improvement from degrading by monitoring the performance"

JUNE 2022 NEWSLETTER

MAY 2022 NEWSLETTER

APRIL 2022 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "The techniques used to make it the lowest possible overhead profiler: infrequent sampling, no stack walking, no thread matching or analysis, minimal processing of data"
  • All the latest Java performance tips extracted in concise form
    • "A cache pattern decision chart: 1 - if your data is crucial for startup and not highly dynamic, use a file persistent storage mechanism closer to the services to store the data; 2 - if your data is highly dynamic, use a dedicated caching technology that can handle this, with caches closer to the service or lower latency than the primary data store; 3 - if your data is not highly dynamic and can be easily invalidated, use a reverse proxy"

MARCH 2022 NEWSLETTER

FEBRUARY 2022 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "it's a very clear well written coverage of all the things that are wrong with using finalize() and the alternatives available to you. If you are an advanced Java developer, you should read it"
  • All the latest Java performance tips extracted in concise form
    • "A simple java.lang.ref.Cleaner example to clean up resources (for some obj) instead of implementing a finalize() method would be similar to Cleaner cleaner = Cleaner.create(); Cleaner.Cleanable cleanable = cleaner.register(obj, cleanupRunnableWhenObjGCed) and if you want to execute the clean up early, you can execute cleanable.clean() (which would execute the cleanupRunnableWhenObjGCed runnable immediately. The runnable is never executed more than once even including GCs"

JANUARY 2022 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "What's most interesting is how simple and straightforward the basic implementation of a Java simple agent is. If you want to try it, you can be up and running with your own agent implementation in minutes!"
  • All the latest Java performance tips extracted in concise form
    • "The JVM has 3 entry points: agentmain, premain, main. -javaagent uses premain, which also runs on the main thread, and you can have multiple java agents. The agentmain is on it's own thread and if you attach to a JVM you enter this thread. You can have multiple agents but there is only one entry thread"

DECEMBER 2021 NEWSLETTER

NOVEMBER 2021 NEWSLETTER

OCTOBER 2021 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "GC log analysis tools are very useful - and now, one of the two commercial GC log analyzers, Censum, has open sourced it's core as GCToolkit."
  • All the latest Java performance tips extracted in concise form
    • "Workloads have become memory bound - CPUs spend most of their time waiting for data to reach them, rather than processing that data. This means you often need to focus on optimizing getting data to the CPU to get speedups. Focus on "Instructions per cycle" - production workloads should be around 1.5 if efficient. Note that a stalled CPU is still reported as 100% utilized by the metric"

SEPTEMBER 2021 NEWSLETTER

AUGUST 2021 NEWSLETTER

JULY 2021 NEWSLETTER

JUNE 2021 NEWSLETTER

MAY 2021 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "Health checks, metrics, telemetry, logs, tracing, profiling - how do they all fit together? I explain"
  • All the latest Java performance tips extracted in concise form
    • "-Xgcpolicy:optthruput is a single generation parallel non-concurrent GC with optional compaction targeted at GC throughput; -Xgcpolicy:gencon is a parallel and concurrent 2-generation GC with concurrent collection in both generations; metronome is an incremental parallel GC with an upper bound on GC pause time; -Xgcpolicy:balanced is like optthruput but reduces the max pause time by doing smaller partial GCs where possible."

APRIL 2021 NEWSLETTER

MARCH 2021 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "Being able to scale is challenging. Being able to autoscale needs you to understand what metrics determine when you need more (or fewer) resources allocated. Architecting to achieve a queueable application is fundamentally different from the ground up."
  • All the latest Java performance tips extracted in concise form
    • "There are three options to handle as much traffic as possible, which can be used in combination: scale (adding sufficient additional capacity to handle the traffic increase); overprovision (already having sufficient additional capacity to handle any traffic increase); queue (temporarily holding requests somewhere and processing when resources are available)."

FEBRUARY 2021 NEWSLETTER

JANUARY 2021 NEWSLETTER

  • We list all the latest Java performance related news and articles
    • "From JDK 17 Shenandoah will be completely concurrent except for some constant time admin operations - all pauses be under 1 millisecond!"
  • All the latest Java performance tips extracted in concise form
    • "Prioritized load shedding works by: Consistently prioritize requests across device types into NON_CRITICAL (does not affect customer experience), DEGRADED_EXPERIENCE (affects customer experience but doesn't prevent primary customer operations), CRITICAL, and score between 1 to 100 for each request given its individual characteristics; progressively throttle requests based on priority; validate by chaos testing (deliberate fault injection) for requests of specific priorities"

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