[concurrency-interest] LBQ vs CLBQ
hanson.char at gmail.com
Wed Apr 4 03:10:50 EDT 2007
I've enhanced the test suite such that:
- the number of concurrent producers can be specified via the system
property "numProducer", which defaults to 10
- multiple concurrent consumers is now supported via the system
property "numConsumer", which defaults to 1
- the W/C ratio (ie wait-time to compute-time) can be specified via
the system property "wcRatio", which defaults to 0
For example, to run the test with 10 producers, 3 consumers, and a W/C ratio
java -DnumConsumer=3 -DnumProducer=10 -DwcRatio=5 -server
-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+DisableExplicitGC -jar
Note an interesting observation is that Windows XP Professional is really
slow on LBQ even when there is only 1 producer and 1 consumer.
On 4/3/07, Trustin Lee <trustin at gmail.com> wrote:
> On 4/4/07, Hanson Char <hanson.char at gmail.com> wrote:
> > Hi Trustin,
> > Actually I think you are right. According to Jcip, the optimal thread
> > pool size should be
> > NumberOfCpu * TargetCpuUtilization * (1 + W/C)
> > where W/C is the ratio of wait time to compute time. Currently W/C is
> > set to zero and TargetCpuUtilization is set to 1 in the q-test.jar.
> > However, since the compute time is near zero, the number of threads
> > for the optimal pool size should be much larger.
> > I'll add a configurable system property such that the W/C can be
> > specified for running the test, and see how it goes.
> > Thanks for pointing this out.
> > Hanson Char
> > ps: Hope you don't mind I cc this to the concurrency forum.
> Of course not. Please cc me.
> what we call human nature is actually human habit
> PGP Key ID: 0x0255ECA6
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest