Here's another interesting thing I got out of another tool I have that
measures thread contention.

This is comparing the concurrent versus non-concurrent WriterAppender
versions, doing the same test 10 times, each test 5 threads writing 1000
times each:  (Code available if curious)  (Single processor)

Concurrent

 239 threads spent 3245 millis in java.io.FileWriter on line 251.  Average: 13, 
Min: 0, Max: 66.
 9 threads spent 1038 millis in java.io.FileWriter on line 252.  Average: 115, 
Min: 0, Max: 327.
 9 threads spent 103 millis in java.util.Vector on line 269.  Average: 11, Min: 
0, Max: 28.
 3 threads spent 103 millis in java.util.Hashtable on line 332.  Average: 34, 
Min: 0, Max: 58.

Non concurrent

 344 threads spent 7692 millis in org.apache.log4j.WriterAppender on line 205.  
Average: 22, Min: 0, Max: 241.
 2 threads spent 209 millis in java.lang.ref.Reference$Lock on line 40.  
Average: 104, Min: 0, Max: 185.
 2 threads spent 183 millis in sun.misc.Launcher$AppClassLoader on line 588.  
Average: 91, Min: 0, Max: 92.
 7 threads spent 55 millis in java.lang.ref.Reference$Lock on line 0.  Average: 
7, Min: 0, Max: 29.

The averages are the wait times for each.  (I think the line numbers and
thread counts are bogus.)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to