You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2020/11/19 06:45:00 UTC

[jira] [Commented] (RATIS-1157) Buffer packets when the size of packets are too small

    [ https://issues.apache.org/jira/browse/RATIS-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17235208#comment-17235208 ] 

Tsz-wo Sze commented on RATIS-1157:
-----------------------------------

[~amaliujia], thanks a lot for filing this JIRA and working on this.

> It is possible that client chooses to write small packets. ...

One typical example is the client writing a transaction log like HBase WAL.

> One optimization could be buffer and then send multiple packets through wires to reduce per packet cost.

We may simply buffer the data in the client side and send only one packet when the buffer is full.  We need an async version of [BufferedOutputStream|https://docs.oracle.com/javase/8/docs/api/java/io/BufferedOutputStream.html].

> This idea will need a benchmark to find a good threshold for "small" packet.

Similar to BufferedOutputStream, we will let the user to choose the buffer size and provide a default value.


> Buffer packets when the size of packets are too small
> -----------------------------------------------------
>
>                 Key: RATIS-1157
>                 URL: https://issues.apache.org/jira/browse/RATIS-1157
>             Project: Ratis
>          Issue Type: Sub-task
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>
> It is possible that client chooses to write small packets. One optimization could be buffer and then send multiple packets through wires to reduce per packet cost.
> This idea will need a benchmark to find a good threshold for "small" packet.
>  
> For example, a client might choose use Ratis streaming to save lots of small files.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)