Reducing latency for small packets on RHEL (NagleTCP

mac2022-06-30  18

SOLUTION UNVERIFIED - 已更新 2013年八月19日13:37 - 

English 

环境

Red Hat Enterprise Linux 4Red Hat Enterprise Linux 5Red Hat Enterprise Linux 6

问题

How do I reduce network latency for my traffic type?

决议

If you are unable to identify or control the ToS marker in IP traffic, you may be able to reduce a delay by using a more simple queue to send traffic to the interface:

Switch to bfifo qdisc with the command

Raw

tc qdisc replace dev ethX root bfifo

where ethX is the network device name.

Alternately, you may establish class filters to direct specific packets toward a bfifo queue.

Nagle's Algorithm and 40ms Delayed Acknowledgements

These are discussed further at How do I control TCP delayed ACK and delayed sending?

根源

Network packets are sent to the network interface in what are called "queuing disciplines" (qdisc).

The default qdisc is pfifo_fast.

pfifo_fast reads the ToS field in an IP packet and places the traffic into three queues based on ToS:

When there are packets in the first queue, only the first queue is serviced.

When there is no traffic in the first queue, but traffic in the second queue, only the second queue is serviced.

When there is no traffic in the first and second queues, but traffic in the third queue, the third queue is serviced.

诊断步骤

Traffic control (tc) command tc qdisc show displays pfifo_fast as the default queuing discipline (qdisc).The manual page at man tc explains traffic shaping in Linux.
最新回复(0)