Make MIN_WRITE_SIZE configurable for AsyncSSLSocket.
Summary:
MIN_WRITE_SIZE is used to avoid small write calls to SSL_write. If there are
consecutive small buffers to write, then will be combined together(by being
copied to a local buffer) until total size exceeds MIN_WRITE_SIZE. This reduces
number of calls SSL_write, improving performance, and avoiding overhead in OpenSSL.
Currently, MIN_WRITE_SIZE is hard coded to be 1500 bytes.
Wormhole could benefit from this, as our average message size is several
hundreds of bytes. We could get even better throughput with larger
MIN_WRITE_SIZE.
As discussed with Adam and Alan, there is a good reason to make it
configurable, though default value is still 1500.
Test Plan: unit tests
Reviewed By: simpkins@fb.com
Subscribers: net-systems@, ssl-diffs@, folly-diffs@, yfeldblum, chalfant, thomasf
FB internal diff:
D1996570
Tasks:
6784543
Signature: t1:
1996570:
1429667035:
a661ef30a715dafec3e134a7f6af6f56ada2e8e0