简体   繁体   中英

Best tcp send buffer size

What is the best tcp send buffer size? For example I want to send a big file (10-100MB) and I set buffer size to 4Kb, but what is the best buffer size for that?

I want to send a big file (10-100MB) and I set buffer size to 4Kb, but what is the best buffer size for that?

Certainly not 4Kb. At least 32-48Kb, or 64Kb or more if you can afford it. In general it should be at least equal to the bandwidth-delay product of the network path, so that you 'fill the pipe' and make maximum use of the available bandwidth.

If you're in control of the other end you should also set its socket receive buffer to a similar size.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM