Re: Récapitulatif destiné à disruptor-net@googlegroups.com - 1 message dans 1 sujet

7 views
Skip to first unread message

Martin Thompson

unread,
Aug 19, 2011, 2:22:08 PM8/19/11
to disrup...@googlegroups.com
The ideal buffer size would fit in cache but be big enough to buffer burst traffic from the publisher when the event processors cannot keep pace.

It can be valid to have a bigger buffer when it is being used for replay, or other purposes, but these can have a performance cost.

2011/8/19 <disruptor-...@googlegroups.com>

Groupe: http://groups.google.com/group/disruptor-net/topics

    Adam Mills <ad...@chambills.com> Aug 19 07:04AM -0700 ^
     
    HI,
     
    I've been playing with Disruptor (great work!).
    And was wondering if there is any guidance for setting the buffer size?
     
    I had initially thought bigger was better, but have found that a small
    buffer size (i.e. 10) is giving me better speeds.
    i am producing and consuming at the same time. (i.e. the producer is started
    on a background thread, unlike the Perf tests in the source)

     


Fil Mackay

unread,
Aug 19, 2011, 7:02:38 PM8/19/11
to disrup...@googlegroups.com
Martin,

What's the default behavior for a lazy (slow) consumer, presumably the publisher gets blocked - do you use a scenario where slow consumers get 'dropped'?

Martin Thompson

unread,
Aug 20, 2011, 3:09:23 PM8/20/11
to Disruptor-net
Eventually the publisher will experience back pressure when the ring
buffer is exhausted.

We do have cases of this in our replication framework for example. If
our secondary nodes stop responding, and thus fall too far behind,
they get dropped as consumers. This is what we often use the alert
mechanism on the barriers for. When the cluster detects a dead node
we alert the other consumers and swap the barrier for one that does
not contain the dropped consumer.

On Aug 20, 12:02 am, Fil Mackay <f...@vertigotechnology.com> wrote:
> Martin,
>
> What's the default behavior for a lazy (slow) consumer, presumably the
> publisher gets blocked - do you use a scenario where slow consumers get
> 'dropped'?
>
>
>
>
>
>
>
> On Sat, Aug 20, 2011 at 4:22 AM, Martin Thompson <mjpt...@gmail.com> wrote:
> > The ideal buffer size would fit in cache but be big enough to buffer burst
> > traffic from the publisher when the event processors cannot keep pace.
>
> > It can be valid to have a bigger buffer when it is being used for replay,
> > or other purposes, but these can have a performance cost.
>
> > 2011/8/19 <disruptor-...@googlegroups.com>
>
> >>   Récapitulatif des sujets du jour
>
> >> Groupe:http://groups.google.com/group/disruptor-net/topics
>
> >>    - Buffer Size Guidance<#131e3489ca0006fb_131e339c2cbeb43b_group_thread_0>[1 mise à jour]
>
> >>   Sujet: Buffer Size Guidance<http://groups.google.com/group/disruptor-net/t/2d3c148ec2ece779>
>
> >>    Adam Mills <a...@chambills.com> Aug 19 07:04AM -0700 ^<#131e3489ca0006fb_131e339c2cbeb43b_digest_top>
Reply all
Reply to author
Forward
0 new messages