Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have noticed both broadcom and Intel NICs allow you tune the number of transmit and receive buffers (A Higher number of buffers will cause more memory usage).

How do these buffers work:

  • What is their size?
  • What is the relation of buffers to TCP or Ethernet sessions if there is one? (i.e. 1 buffer per session or a pool of buffers?)
share|improve this question
add comment

3 Answers

Well, there is some advice on network card buffers that indicates more is better, generally:

http://book.opensourceproject.org.cn/sysadmin/apache/apachetomcat/opensource/090.html

Set the receive buffers on the Network Interface Card on the Web server to a maximum. This reduces the number of dropped packets and reduces TCP retransmissions. You can set this parameter by going to Start | Settings | Control Panel | Network and Dial Up Connections. Select the active LAN Connection typically called Local Area Connection. Right click to select Properties. Click on the Configure button next to the Network Interface Card. Set the receive buffers to the maximum value 1024.

...

You may be wondering about the trade-offs in doing the above. The trade-off is that the operating system will need to allocate more memory for NIC receive buffers and user ports.

share|improve this answer
    
Intel goes through recommended optimizations at intel.com/support/network/sb/cs-025829.htm as well. But I am interested in how these actually interact with the OS and TCP/IP stack. blogs.msdn.com/b/ddperf/archive/2008/06/10/… Gives a lot of insight in to what some of those are. –  Kyle Brandt Feb 26 '11 at 22:03
add comment

The RX and TX buffers generally equate to one Ethernet frame. If you've configured the RX buffer count to 512, then the driver will set aside enough buffers to handle 512 Ethernet frames. The amount of memory will vary slightly as different NICs uses different buffer descriptor data structures, but in general you should multiply the buffer size by the MTU to estimate the amount of memory required.

Dave

share|improve this answer
add comment

If you have code access, there is also the SO_RCVBUF option that is useful, especially on Windows.

Btw, someone knows what is the relation of the RX buffers from the NIC versus the SO_RCVBUF option ? (WskControlSocket/getsockopt)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.