[concurrency-interest] LBQ vs CLBQ

Hanson Char hanson.char at gmail.com
Wed Apr 4 03:10:50 EDT 2007


Hi,

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
of 5:

java -DnumConsumer=3 -DnumProducer=10 -DwcRatio=5 -server
-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+DisableExplicitGC -jar
q-test.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.

Downloads:

    http://beanlib.sourceforge.net/clbq/070403/q-test.jar
    http://beanlib.sourceforge.net/clbq/070403/q-test-sources.jar

Hanson Char

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.
>
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20070404/196b4120/attachment-0001.html 


More information about the Concurrency-interest mailing list