Do not try to fill socket send buffer to the last byte.
Setting so_snd.sb_lowat to at least 1/8 of the socket buffer size allows send thread more actively use PDUs coalescing, that dramatically reduces TCP lock congestion and number of context switches, when the socket is full and PDUs are small. MFC after: 1 week Sponsored by: iXsystems, Inc.
This commit is contained in:
parent
7096c29e5b
commit
1f29b46c42
@ -914,7 +914,8 @@ icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu_stailq *queue)
|
|||||||
"have %ld, need %ld",
|
"have %ld, need %ld",
|
||||||
available, size);
|
available, size);
|
||||||
#endif
|
#endif
|
||||||
so->so_snd.sb_lowat = size;
|
so->so_snd.sb_lowat = max(size,
|
||||||
|
so->so_snd.sb_hiwat / 8);
|
||||||
SOCKBUF_UNLOCK(&so->so_snd);
|
SOCKBUF_UNLOCK(&so->so_snd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user