[jboss-jira] [JBoss JIRA] (JGRP-2140) Replace Table with RingBuffer in UNICAST3 and NAKACK2

Bela Ban (JIRA) issues at jboss.org
Thu Jul 27 09:45:00 EDT 2017


    [ https://issues.jboss.org/browse/JGRP-2140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13441140#comment-13441140 ] 

Bela Ban commented on JGRP-2140:
--------------------------------

Blocking - as mentioned above - is a showstopper, so RingBuffer cannot be used in its current implementation.

However, perhaps RingBuffer can be augmented to grow when its capacity has been exceeded? To prevent RingBuffers with large capacities, they could also be compacted every now and then...

Such a feature should be configurable: {{off}} means we have a bounded RingBuffer with adders blocking when the capacity has been reached, and {{on}} would enable the automatic resizing of the buffer size.

> Replace Table with RingBuffer in UNICAST3 and NAKACK2
> -----------------------------------------------------
>
>                 Key: JGRP-2140
>                 URL: https://issues.jboss.org/browse/JGRP-2140
>             Project: JGroups
>          Issue Type: Enhancement
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>             Fix For: 4.x
>
>
> Table does allocate memory on resizing or compaction; whereas RingBuffer doesn't. Replacing Table with RingBuffer might bring memory allocation rates even further down.
> However, using RingBuffer as message store means that the capacity is fixed; when the RingBuffer is full, sender threads would have to block as messages cannot be dropped. 
> However, blocking is something that should be done in a flow control protocol, such as {{UFC}} or {{MFC}}, and some applications might choose completely non-blocking flow control, e.g. {{UFC_NB}} or {{MFC_NB}}, and blocking in {{UNICAST3}} or {{NAKACK2}} would move part of the blocking/non-blocking aspect away from the flow control protocols.
> Measure the impact on performance. Table is a critical class used by NAKACK2 and UNICAST3, and is battle tested. Do this only if the benefits trump the risk.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list