Hacker News new | ask | show | jobs
by hamai 4419 days ago
Wouldn't prioritizing packets at routers create slower queues for low priority packets?

Murphy's Law tells me there's a good chance these low priority queues will slow down exponentially at random times. Routing nightmare if you consider DDoS and what not.

1 comments

Not that simple. Queues can manage the latency of packets, not just by priority but by time-stamping packets and sorting them.

Priority is a sucky way to do anything - queues, threads, even email. What we usually want is control over latency.

Latency isn't really the problem. Latency has three causes in practice: The speed of light, router packet buffers, and (generally congestion-related) packet loss. The first isn't usually a problem and there is nothing to be done about it anyway. The second and third aren't actually latency issues at all, they're latency as a side effect of a bandwidth shortfall. The only way to actually fix that is to add more bandwidth. The best you can do otherwise is to choose who gets screwed over by the lack of bandwidth, which is exactly the thing you don't want the likes of Comcast doing.
Latency is the issue in routers when they categorize traffic, that was the idea. They don't simply prioritize packets; they age them and sort to try and ensure latency constraints. So its more complicated than priority.
> Latency is the issue in routers when they categorize traffic, that was the idea.

That's what I'm contesting.

Suppose you have a router which is receiving data to be sent over a 1Gbps link. Over a one hour period there is an average of 600Mbps of streaming video, 400Mbps HTTP traffic and 300Mbps of FTP/BitTorrent/etc. traffic. There is more data than there is link to put it in; you are screwed. The streaming video is going to stutter or degrade to lower quality, web pages will be slow to load, people waiting for downloads to finish will have to wait longer, because there is not enough bandwidth. The latency will also be poor, if router buffers are set too large and create a large queue in front of new packets (bufferbloat), but that's the least of your worries in that situation. Fixing the latency wouldn't clear things up because you still have users trying to play video with a bitrate of 6Mbps through a connection with a 4Mbps throughput. And categorizing the traffic only changes who gets screwed -- if you put downloads at the bottom of the heap then you might make the streaming video and HTTP customers happier but the customer who paid for a 6Mbps connection and would have at least been downloading at 4Mbps is now waiting for a download which getting only 0.2Mbps. That's not a solution, it's triage.

Now suppose you have the same amount of traffic on average but the link is upgraded to 2Gbps. Now there is no packet loss. You might have short bursts where the traffic level exceeds the capacity of the link, but they get smoothed out by the router's buffers, which never get full so the queue length is never more than a few milliseconds. Solving the bandwidth problem solves the latency problem.

The point is, if you're trying to fix the latency that occurs as a result of router buffers getting full or dropping packets in the core of the internet, you're rearranging the deck chairs on the Titanic. The underlying problem is that router buffers are getting full or dropping packets in the core of the internet.