dev@grizzly.java.net

Re: CircularQueuePipeline ?

From: charlie hunt <charlie.hunt_at_sun.com>
Date: Wed, 24 Sep 2008 11:36:10 -0500

Salut,

I'm attaching the CircularQueuePipeline. It's actually two files. One
is a CircularQueue data structure which supports the APIs needed by the
CircularQueuePipeline.

I think we talked about this before at one time?

I wonder if we should consider making CircularQueue or LinkedList
plug-able into the Pipeline?

Since you're the Pipeline expert, would you like to do a quick review of
this implementation?

A+

charlie ...

PS: I did some performance testing with this Pipeline versus the
LinkedListPipeline. The CircularQueuePipeline will perform better
under circumstances where there gets to be large number of entries in
the queue waiting to be executed. But, that's not a desire-able
situation. It also does slightly better on systems with small CPU
caches relative to the number of virtual processors (i.e. SPARC T1/T2
processors). The underlying circular queue being an array is more CPU
cache friendly being an array than a set of linked list nodes which
could be scattered randomly throughout memory. But, on traditional x86
architectures, it appears LinkedListPipeline does slightly better than
CircularQueuePipeline, especially if the number of entries in the
LinkedList is relatively small.

charlie ...

Jeanfrancois Arcand wrote:
> Salut,
>
> charlie hunt wrote:
>> Thanks!
>>
>> I'll try to get it committed sometime today, (before I forget).
>
> Yes that would be quite nice because we can swithc the DefaultPipeline
> to use that one. Take a look at:
>
> https://grizzly.dev.java.net/nonav/apidocs/com/sun/grizzly/ThreadPoolExecutorServicePipeline.html
>
> https://grizzly.dev.java.net/nonav/xref/com/sun/grizzly/ThreadPoolExecutorServicePipeline.html
>
>
> A+
>
> --Jeanfrancois
>
>>
>> charlie ...
>>
>> Oleksiy Stashok wrote:
>>> I can not find it :)
>>>
>>> WBR,
>>> Alexey.
>>>
>>> On Sep 24, 2008, at 14:03 , charlie hunt wrote:
>>>
>>>> Could someone who has the trunk checked out look to see if I ever
>>>> committed the CircularQueuePipeline?
>>>>
>>>> I implemented this about a year ago as an attempt to improve
>>>> performance. But, I don't recall if I ever committed it. %-)
>>>>
>>>> thanks,
>>>>
>>>> charlie ...
>>>>
>>>> --
>>>>
>>>> Charlie Hunt
>>>> Java Performance Engineer
>>>>
>>>> <http://java.sun.com/docs/performance/>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>