A random thing I ran into with the defaults (Ubuntu Linux):<p>- net.ipv4.tcp_rmem ~ 6MB<p>- net.core.rmem_max ~ 1MB<p>So.. the tcp_rmem value overrides by default, meaning that the TCP receive window for a vanilla TCP socket actually goes up to 6MB if needed (in reality - 3MB because of the halving, but let's ignore that for now since it's a constant).<p>But if I "setsockopt SO_RCVBUF" in a user-space application, I'm actually capped at a maximum 1MB, even though I already have 6MB. If I try to <i>reduce it</i> from 6MB to e.g. 4MB, it will result in 1MB. This seems very strange. (Perhaps I'm holding it wrong?)<p>(Same applies to SO_SNDBUF/wmem...)<p>To me, it seems like Linux is confused about the precedence order of these options. Why not have core.rmem_max be larger and the authoritative directive? Is there some historical reason for this?