[logback-dev] Throughput of fair locks

Ceki Gulcu ceki at qos.ch
Sat Jun 13 23:45:36 CEST 2009


Hello all,

I added a new application measuring the compared throughtput of the synchronized 
primitive versus fair and unfair locks. Here are the results.

java.runtime.version = 1.6.0_11-b03
java.vendor          = Sun Microsystems Inc.
java.version         = 1.6.0_11
os.name              = Linux
os.version           = 2.6.25-gentoo-r6
Sync:   139698775, or 35 nanos per cycle
Unfair: 87028802, or 57 nanos per cycle
Fair:   4106449, or 1217 nanos per cycle

java.runtime.version = jvmxa6460-20081105_25433
java.vendor          = IBM Corporation
java.version         = 1.6.0
os.name              = Linux
os.version           = 2.6.25-gentoo-r6
Sync:   356946629, or 14 nanos per cycle
Unfair: 91892449, or 54 nanos per cycle
Fair:   7380308, or 677 nanos per cycle

As you can see there is a substantial difference in throughput. The ration is 
about 40.

Cheers,

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch


More information about the logback-dev mailing list