Queues and buffering: where delay comes from
لم يُترجم بعد؛ يُعرض باللغة الإنجليزية
Why does a video call stutter when someone else in the house uploads a big file? Follow packets from a fast home network into a router whose uplink is 100 times slower: they wait in a queue, the queue fills, and your call waits behind it. Then see how CoDel and FQ-CoDel keep the line short.
5 أسئلة سريعة
اختر إجابة لتعرف السبب. تُحفَظ نتيجتك مع تقدّمك.
01How long does it take to send one 1,500-byte packet onto a 10 Mb/s link?
Transmission time = size ÷ speed: 1,500 bytes × 8 = 12,000 bits, and 12,000 ÷ 10,000,000 bits per second = 0.0012 s = 1.2 ms.
02Which part of delay can grow from almost nothing to most of a second on the same link?
Propagation, transmission and processing are fixed by distance, size and hardware. Queueing depends on how many packets are ahead of yours, which depends on everyone else's traffic.
03A router has a 1 MB buffer on a 10 Mb/s uplink, and a big upload keeps it full. About how long does a new packet wait?
1 MB is 8,000,000 bits. At 10,000,000 bits per second the queue takes 0.8 s to empty, so a packet at the back waits about 0.8 s. That is bufferbloat.
04What does a router do with a new packet when its buffer is full and it uses tail drop?
With tail drop the new arrival is simply discarded. TCP notices the missing packet and slows down, but loss-based TCP soon speeds up and fills the buffer again.
05How does FQ-CoDel help your video call while an upload is running?
Each flow gets its own queue, kept short by CoDel. The call is a quiet (sparse) flow, so its packet goes out right after the upload packet already on the wire: about 1.2 ms of waiting.
المسرد
- Queue and buffer
- A queue is a line of packets waiting to be sent on a link, first in, first out. The buffer is the router memory that holds it; queueing delay is the time a packet spends waiting there.
- Transmission delay
- The time to push a packet's bits onto the link: packet size divided by link speed. Also called serialization delay.
- Propagation delay
- The time the signal takes to travel the distance, about 5 µs per km in optical fibre, and about 120 ms just to climb to a geostationary satellite 35,786 km up.
- Tail drop
- Throwing away new arrivals when the buffer is full.
- Bufferbloat
- Too much buffering for a link's speed: under load the queue grows long and adds large delay before any packet is dropped, so TCP's signal to slow down comes late.
- Flow
- One conversation between two programs, such as your video call or the photo upload. Routers tell flows apart by addresses, ports and protocol.
- TCP congestion control
- The rules a TCP sender uses to pick its speed: it speeds up step by step and slows down when a packet is lost (or marked), which tells it the path is full.
- CoDel and FQ-CoDel
- Active queue management (AQM): the router drops or marks packets early to keep delay short. CoDel acts when waits stay above 5 ms for 100 ms; FQ-CoDel also gives each flow its own queue.
الملاحظات والمصادر
- Processing time (10 µs), the 50 km fibre run and the 1,200-byte call packet are illustrative; the other numbers follow from the link rates, the 1,500-byte Ethernet MTU and the 1,000,000-byte buffer.
- 192.168.1.20 and 192.168.1.30 are private home addresses (RFC 1918); 198.51.100.1, 203.0.113.20 and 192.0.2.40 are documentation addresses (RFC 5737).
- The tray draws at most 8 envelopes; the count above it gives the real number of packets waiting.
- Downloads queue the same way, but at the ISP's end of the link, where traffic from the fast internet meets your slower line.
- Loss-based TCP (Reno, CUBIC) keeps growing until a packet is lost, which is why it fills any buffer; delay-based and model-based senders such as BBR try to keep queues short themselves.
- With ECN (RFC 3168) CoDel can mark a packet instead of dropping it; the sender slows down just the same.
اختبار يتاح بعد الخطوة الأخيرة.