Please, Linux kernel hackers, what is a reasonable buffer size for write(2) syscall to sockets or files, performance-wise? It’s clear that it’s some pagesize multiple, but which one? Does it matter? What is “too small” and “too big”?
Please, Linux kernel hackers, what is a reasonable buffer size for write(2) syscall to
Share
depends on how big your delay to the peer is, let’s say you have a 100MBps connection, and a delay of 50ms, then you can calculate
but the default window size in Linux 2.6 is around 110KB, which will limit your throught out to around 2.2MBps (110KB / 0.050)
so, to fix that you can you
setsockopt