zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lvfangmin <...@git.apache.org>
Subject [GitHub] zookeeper issue #593: [ZOOKEEPER-3111] Add socket buffer size option to tune...
Date Wed, 05 Sep 2018 18:45:26 GMT
Github user lvfangmin commented on the issue:

    https://github.com/apache/zookeeper/pull/593
  
    @maoling, sorry for the lately reply, I forgot to reply this PR. 
    
    We've done some benchmark when we added this code a year ago, I was trying to find some
benchmark data at that point, but I cannot find it yet.
    
    I've done some benchmark internally today, and found the performance of different buffer
size is highly depending on the traffic pattern, and may actually introduce higher latency,
so it's hard to give a suggested buffer size. But I don't think the extra negotiation time
during connecting is a problem here, since we only set the buffer size between quorum servers,
which is very few connections and it's stable.
    
    Internally, we're not customizing the buffer size with this option anymore, instead we're
using the system TCP Autotuning options net.ipv4.tcp_wmem and net.ipv4.tcp_rmem, which are
more flexible and will automatically adjusts socket buffer sizes as needed to optimally balance
TCP performance and memory usage, so we're not customizing the buffer size anymore.
    
    **As for the unit test**, those SO_SENDBUF and SO_RCVBUF options are used by the platform's
networking code as a hint for the size to set the underlying network I/O buffers, so it doesn't
always guarantee it will use what you told it to. So I think this test is not that useful
from this point of view.
    
    Overall, I think we probably don't need this custom option anymore because it's hard to
configure right.


---

Mime
View raw message