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 June 2005

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

Get rid of your performance problems and memory leaks!

Back to newsletter 055 contents

You might think that two threads of the same priority both repeatedly contending for the same lock would overall get to lock it for the same number of times. But a fascinating point, backed by observed behavior, was raised by Billy Newport in this server side discussion.

Where the contention is bursty - which it often is in high-load systems - the operating system can favor one thread over the other because the thread releasing the lock is already running, and so has a lower context switching overhead to re-acquire the lock than the other waiting thread. The result can be that one thread gets a disproportionate amount of access through a critical section, starving other threads and unbalancing your application.

Solutions to this situation include yield()'ing more often; alternative patterns such as the Gatekeeper one that inspired the discussion referred to; explicitly queueing requests to acquire the resource (instead of using the implicit Java queues associated with each monitor that you get with synchronization); or at a higher level using communicating sequential processes (CSP), a framework that is currently being explained in three articles over at IBM developerworks.

A note from this newsletter's sponsor

Wily Technology delivers what you need: Availability, Performance and Control
The most critical web applications in the world are managed by
software from Wily, the leader in enterprise application management

In the newsletter we list our usual raft of articles, news and tools, and more. Kirk delves into reachability of objects, removing duplicates from lists, helping HotSpot compilation and much more in his roundup of performance discussions; and we have over 50 new performance tips extracted in concise form.

And a final mention - those of you in London on the 15th July might want to join me for lunch at the Sun central London offices for the latest JSIG seminar - see our first news item below.


Java performance tuning related news.

A note from this newsletter's sponsor

Multi-threaded applications offer a better user experience,
generally run faster, and allow better encapsulation.
They don't have to be as tricky as you think.


Recent Articles

Jack Shirazi

Back to newsletter 055 contents

Last Updated: 2024-03-29
Copyright © 2000-2024 All Rights Reserved.
All trademarks and registered trademarks appearing on are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
RSS Feed:
Trouble with this page? Please contact us