mtcp-stack / mtcp

mTCP: A Highly Scalable User-level TCP Stack for Multicore Systems
Other
2k stars 435 forks source link

Simplifying recv and send buffer size in the configuration #171

Closed uttampawar closed 6 years ago

uttampawar commented 6 years ago

Since recv and send buffer size needs to be same, we can simplify by specifying only one variable for e.g. recvbuf=16384, and mtcp should use that same for sndbuf avoiding conflicting values in the conf file.

ajamshed commented 6 years ago

I think maintaining different buffer size thresholds for send and recv will be better in the long run. There are some applications that may have different requirements e.g. keeping send buffer sizes larger than recv buffer sizes and vice versa. Linux networking modules also allow users to modify buffer sizes separately (e.g. /proc/sys/net/ipv4/tcp_rmem, /proc/sys/net/ipv4/tcp_wmem).

uttampawar commented 6 years ago

@ajamshed I was thinking that user need to specify them only if they are different, otherwise one value should be suffice. Does that make sense?

ajamshed commented 6 years ago

I will make the change in my next commit.