Skip to content

Instantly share code, notes, and snippets.

@pexcn
Last active June 9, 2021 01:17
Show Gist options
  • Save pexcn/22c1f816e5810cd7805c243fc6804060 to your computer and use it in GitHub Desktop.
Save pexcn/22c1f816e5810cd7805c243fc6804060 to your computer and use it in GitHub Desktop.
SO_RCVBUF and SO_SNDBUF settings
BDP = Bandwidth * RTT

e.g.:

Server
SO_RCVBUF: 125000000Bytes (1000Mbps), 0.02s (20ms)
125000000Bytes * 0.02s = 2500000Bytes
SO_SNDBUF: 125000000Bytes (1000Mbps), 0.165s (165ms)
125000000Bytes * 0.165s = 20625000Bytes

Local
SO_RCVBUF: 18750000Bytes (150Mbps), 0.165s (165ms)
18750000Bytes * 0.165s = 3093750Bytes
SO_SNDBUF: 3750000Bytes (30Mbps), 0.05s (50ms)
3750000Bytes * 0.05s = 187500Bytes
@pexcn
Copy link
Author

pexcn commented May 16, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment