File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 5252 */
5353
5454public class ConnectionFactory {
55+ // We explicitly set some minimum buffer sizes for consistent reasonable behaviour
56+ // These will only be applied if that platform's default is not larger than this.
57+
58+ // Due to our disabling of Nagle's algorithm, small buffers can very easily result in us
59+ // sending a very large number of buffer sized packets. When we write messages faster than
60+ // we can send them across the network, this quickly becomes a performance bottleneck.
61+ // Empirically, the throughput for with and without Nagle's seems to equalise around a
62+ // send buffer size of 8-10k for local messages. We need to do more benchmarking to verify
63+ // whether there's a better choice of default number for typical ethernet setups.
5564 public static final int DEFAULT_SOCKET_SEND_BUFFER_SIZE = 10 * 1024 ;
65+
5666 public static final int DEFAULT_SOCKET_RECEIVE_BUFFER_SIZE = 50 * 1024 ;
5767
5868 private final ConnectionParameters _params ;
You can’t perform that action at this time.
0 commit comments