Skip to content

Commit e19cfa4

Browse files
authored
Merge pull request #3436 from bwbarrett/v2.0.x
btl tcp: Don't set socket buffer size by default
2 parents d59ad12 + ff2c282 commit e19cfa4

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

opal/mca/btl/tcp/btl_tcp_component.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,20 @@ static int mca_btl_tcp_component_register(void)
246246
mca_btl_tcp_param_register_int ("free_list_num", NULL, 8, OPAL_INFO_LVL_5, &mca_btl_tcp_component.tcp_free_list_num);
247247
mca_btl_tcp_param_register_int ("free_list_max", NULL, -1, OPAL_INFO_LVL_5, &mca_btl_tcp_component.tcp_free_list_max);
248248
mca_btl_tcp_param_register_int ("free_list_inc", NULL, 32, OPAL_INFO_LVL_5, &mca_btl_tcp_component.tcp_free_list_inc);
249-
mca_btl_tcp_param_register_int ("sndbuf", NULL, 128*1024, OPAL_INFO_LVL_4, &mca_btl_tcp_component.tcp_sndbuf);
250-
mca_btl_tcp_param_register_int ("rcvbuf", NULL, 128*1024, OPAL_INFO_LVL_4, &mca_btl_tcp_component.tcp_rcvbuf);
249+
mca_btl_tcp_param_register_int ("sndbuf",
250+
"The size of the send buffer socket option for each connection. "
251+
"Modern TCP stacks generally are smarter than a fixed size and in some "
252+
"situations setting a buffer size explicitly can actually lower "
253+
"performance. 0 means the tcp btl will not try to set a send buffer "
254+
"size.",
255+
0, OPAL_INFO_LVL_4, &mca_btl_tcp_component.tcp_sndbuf);
256+
mca_btl_tcp_param_register_int ("rcvbuf",
257+
"The size of the receive buffer socket option for each connection. "
258+
"Modern TCP stacks generally are smarter than a fixed size and in some "
259+
"situations setting a buffer size explicitly can actually lower "
260+
"performance. 0 means the tcp btl will not try to set a send buffer "
261+
"size.",
262+
0, OPAL_INFO_LVL_4, &mca_btl_tcp_component.tcp_rcvbuf);
251263
mca_btl_tcp_param_register_int ("endpoint_cache",
252264
"The size of the internal cache for each TCP connection. This cache is"
253265
" used to reduce the number of syscalls, by replacing them with memcpy."

0 commit comments

Comments
 (0)