title: how to tune linux network buffer size
body: <p>I'm reading "Kafka The Definitive Guide", in page 35 (networking section) it says :</p>
  
  <blockquote>
    <p>... The first adjustment is to change the default and maximum amount of
    memory allocated for the send and receive buffers for each socket. This will significantly increase performance for large transfers. The relevant parameters for the send and receive buffer default size per socket are net.core.wmem_default and
    net.core.rmem_default......
    <strong>In addition to the socket settings, the send and receive buffer sizes for TCP sockets must be set separately</strong> using the net.ipv4.tcp_wmem and net.ipv4.tcp_rmem parameters.</p>
  </blockquote>
  
  <p>why we should set both net.core.wmem and net.ipv4.tcp_wmem?</p>