Tuesday, September 23, 2008

A Fast Switched Backplane for a Gigabit Switched Router

This paper provides an introduction to how high-throughput switches and routers are designed, focusing on how to employ a switched backplane effectively. I liked the fact that the paper started with some context about other router design choices (centralized CPU/memory, one CPU per line card and bus, etc), since this explains the historical context and the reason why we are worrying about switched backplanes. Beyond this, the paper explains several concepts/algorithms that can make a switched backplane efficient:
  • VOQ (having one queue per output at each port), which avoids the "head of line blocking" problem where packets need to wait until the one at the head of a FIFO queue has had a chance to go to its desired output. I liked the traffic analogy for this.
  • Fixed-size cells, which simplify the scheduling to a timeslot-based process and thus improve efficiency.
  • iSLIP / ESLIP, a bidding-based heuristic algorithm that finds a matching between inputs and outputs quickly on each timestep.
  • Using the properties of the switch fabric to replicate cells for multicast.
  • Priorities for QOS.
  • Speedup of the switch fabric compared to the input rates to prevent blocking-related reductions in throughput (apparently 2x can be sufficient).
  • Fanout splitting for multicast (allow sending on some links even if one is not scheduled to send on all of them).
These techniques are all explained intuitively and evaluated through analysis/simulation. It's useful to see them all in one document as a set of guidelines.

One question I have about the work is how to support more advanced queueing disciplines than FIFO with priorities in this kind of fabric. When we read the fair queueing work, we said that fair queueing is supported in today's high-speed routers, but how would it be done in a switch like this? Is it possible to implement it only at the line cards and then use the 2-3 priority levels for scheduling outputs? Perhaps this is discussed in other papers, but it wasn't discussed in this one.

From the point of view of organizing the course, it would make more sense to put this paper before the 100 TB router one in the reading list.

Scaling Internet Routers Using Optics

This paper explains how a 100 TB router may be designed using future optical technology. The basic idea is to take the Load-Balanced Switch design and fix some of its problems, including creating a fabric that can switch rapidly, packet mis-sequencing (which is fixed by the FOFF policy for spreading work evenly across second-stage queues and a buffer), and working when some linecards are down (which is solved by a complex modular design). The switch design is notable because it requires no centralized scheduler, achieves full throughput, and is agrued to be feasible using technology a few years from now. However, the main shortcoming of the paper is that there is no implementation even of a prototype, and so no way to actually evaluate the switch design. This means that for practical purposes, this is still only design work for improving the Load-Balanced Switch, and may not necessarily lead to a good implementation. Since I don't know much about the hardware used in switches and trends in its manufacturing, it's very hard to tell how realistic the design is.

One interesting aspect of the paper is the point that using optical fabric can reduce power usage. Certainly, power is a very significant concern in network equipment, and the availability of nearly zero-power switching fabrics using optical technology is exciting. However, electronics will apparently still be needed for routing decisions. How much power will be wasted in converting from optical signals to electronic ones? The paper seems to gloss over these points, maybe because the answer is very well-known, but it's hard to tell how feasible the design is without this knowledge.

Wednesday, September 17, 2008

Supporting Real-Time Applications in an Integrated Services Packet Network

This paper provides a pretty detailed design for a network supporting Integrated Services QOS, including what types of services to provide and how to schedule packets at the routers. There are several interesting and nonobvious ideas. First, the paper categorizes applications into rigid or adaptive and tolerant or intolerant, a useful taxonomy for examining how applications' needs differ. Second, the paper presents "predicted" services as an important service class. Predicted services differ from guaranteed capacity and delay bounds by saying only that an application will get similar performance to what it had in the past if network conditions continue to be similar. Even though this means there are no hard guarantees, it can lead to much better utilization of the network due to statistical multiplexing, and it is actually a useful service model for playback applications because they can adjust buffering intervals and rates to compensate. Third, in the packet scheduling part of the paper, we see that while Fair Queueing is a good way to isolate flows and provide performance guarantees, FIFO scheduling leads to much better potential throughput and performance for predicted services as long as flows are well-behaved. Again, we ultimately want to take advantage of statistical multiplexing to make the network efficient. Finally, the paper combines weighted fair queueing and priority scheduling to support guarnateed, predicted and best-effort traffic in the same scheduling algorithm. There is a well thought-out explanation of how priority shifts jitter between classes, FIFO minimizes average delay, and WFQ provides isolation.

One weakness of the paper is the service model chosen - describing flows' needs explicitly based on token buckets, delay bounds, etc. It seems difficult to calculate the requirements for an application, and even more difficult to get people to provide reasonable requirements rather than asking for more than they really need. Any design based on reservations will also have pricing complexity and scalability challenges (how to perform allocation). Admission control will also be a challenge (and the paper only briefly mentions how it might be performed). In the end, perhaps predicted service is the only class of "better-than-best-effort" service we can provide in the Internet in a usable, scalable fashion, by giving it a simple pricing model (say 2x more expensive per byte). This is more or less what work on Differentiated Services tried to achieve.

The paper also focuses mostly on a complete system design, rather than on what's needed for incremental deployment. While this is necessary to present an idea in its complete form to the research community and to focus light on the core issues, it may reduce interest in the work because there isn't any clear path to evaluation and deployment. Often researchers provided at least a network simulator implementation for proposed router mechanisms or transport protocols, but I think this paper had neither of those.

Fundamental Design Issues for the Future Internet

This paper takes a step back from QOS work and explains economically why QOS might be a good idea, and what issues need to be resolved in implementing it. The author uses a utility model to quantitatively explain some of the motivation for QOS and help understand the design choices. For example, he shows that priority scheduling provides better aggregate utility than FIFO when some flows care more about delay. Utility functions are also used to explain convincingly why best-effort works for bulk transfer applications but not for realtime applications where utility drops sharply below a certain level. This is an argument for admission control. Some back-of-the-envelope calculations also show that overprivisioning may not be sufficient if even a small number of users have extremely large flows. Finally, the author explains the tradeoff between different ways of identifying service classes for flows: while identifying them automatically in the network based on port number, protocol type, etc helps reuse applications, a pricing model approach where applications choose their service class can lead to more flexibility.

Obviously QOS did not take off in the wide-area Internet, and the reasons this happened provide valid criticisms of the paper. The main reasons why QOS didn't take off were probably improvements in bandwidth (and its price) and the difficulty in charing for services that use QOS. Despite the fact that a QOS system could increase utility for everybody, that kind of market won't be set up if it's complicated to determine pricing, account for usage, explain charges to users, get users to accept variable per-month pricing, etc. These "mundane" details were probably as important as technical challenges and architectural rigidity in hindering adoption of QOS, because it would be easy (if hacky) to wrap around existing protocols and clients and just put applications in the best-effort class if they are not specifically marked for QOS. The improvements in bandwidth also helped. Finally, there was perhaps less demand for online video than expected because of the distribution costs (multicast could have helped here, but it also didn't really take off). Many computer networking researchers express some surprise that in the end YouTube, with its non-live, low-quality content, has become the main form of online video.

Nonetheless, the fact that QOS didn't take off and the Internet is doing okay doesn't mean that we shouldn't consider how much better the Internet could be with a different service model. Certainly online video and audio services are still challenging to implement, low in quality, and not used extremely widely. Other interactive applications, such as games, also suffer from the unnecessarily large latencies imposed by the Internet - ask anyone who plays them. Even "bulk transfer" web-based applications use dedicated links or CDNs such as Akamai to reduce latencies, which has a significant effect on user engagement. So in the end, if we see *any* major qualitative change in the Internet in future years, it could well be due to lower latency enabling new applications.

Sunday, September 14, 2008

Random Early Detection Gateways for Congestion Avoidance

This paper describes the Random Early Detection queue management strategy for routers, which provides feedback to TCP connections before congestion occurs to keep queue sizes small and avoid drops, thus improving both throughput and delay. RED works by marking packets for congestion with some probability when the queue size is between two thresholds, and then marking 100% of packets when it exceeds the max threshold. This "smooths out" the congestion notification, rather than going from allowing everything through to dropping everything. It also keeps queue sizes small, avoiding unnecessary delays. Finally, the use of marks reduces packet drops while still avoiding congestion (although RED can also be used with drops, and this would mean no changes to endpoints are necessary).

The paper is especially interesting for its detailed analysis of the problem and its comparison with similar proposed schemes. An especially interesting aspect is how RED is designed to avoid synchronization - many connections lowering their window together, than raising it together, etc, leading to oscillations. Synchronization is a rather scary aspect of end-to-end networking, and several of Sally Floyd's papers address it and have perhaps helped prevent it in many protocols in the global Internet. XCP is also designed to reduce oscillations, and this is how it gains in throughput over TCP even in some low-bandwidth-delay-product settings. In the XCP paper, it is mentioned that even RED can't manage oscillations perfectly at very high throughputs, but RED clearly works well in the experiments in the paper.

Finally, unlike some other QOS mechanisms, RED with drops is fairly easy to deploy incrementally and provides a benefit even to legacy protocol. Is it actually available today on any routers? RED with just marking, on the other hand, still has problems because the end-hosts would need to be able to understand the markings (in fact, un-upgraded hosts would have an advantage over upgraded ones).

XCP - Congestion Control for High Bandwidth-Delay Product Networks

This paper presents a clean-slate router-assisted transport protocol that overcomes some deficiencies of TCP. In a nutshell, XCP asks end-hosts to state their congestion window and RTT estimate in packet headers, and uses this information to provide exact feedback about how they should change their window. This can be done without per-flow state. The main selling point for XCP is better performance on high bandwidth-delay product networks, where TCP is known to perform poorly and to become unstable (partly due to having to use additive increase of 1 packet, partly due to using losses as congestion signals). However, XCP also provides other advantages, such as fast convergence to efficiency and fairness, very low queue sizes, virtually nonexistent drops, separation of the efficiency and fairness controllers, and support for differentiated services. Simulations show that XCP performs as well as TCP or better in a variety of common scenarios (not just high delay-bandwidth product networks). All of this evaluation is necessary to motivate of XCP because it requires significant changes to the network: support in every router and end-host, and the architectural change of performing congestion control based on fields in the packet headers.

My main criticism of the paper is against keeping per-flow state in packet headers. The issue with this is that it's very easy to cheat at an endpoint, or to have a misconfigured router overwhelm a link. In a TCP-based network, congestion due to any reason causes packet drops, which are a signal to every host to reduce their rate. The drops can also be arranged to affect the misbehaving sender more than the others through something like RED. However, in an XCP network, there is plenty of capacity in the queues, so a misbehaving sender may get most of their packets through just fine, while still degrading performance for other users. The authors suggest policing at the edge of the network, but this is difficult to deploy, and there are few incentives for ISPs to do it. Even worse, an attacker may attack XCP *without* creating a large flow by simply requesting capacity as if they were to start a large flow. The network has to grant this capacity and reduce that of other flows, but there is no way to detect that the flow isn't actually going to use the bandwidth until some time later. This is like a SYN flood against routers. In contrast, TCP will utilize links pretty well even when many small flows are open. In summary, it seems that TCP should inherently be more robust to misbehaving users on a large network than XCP.

The work is nonetheless very interesting because of the magnitude of improvement that can be achieved, and it's one of those papers that makes us question the TCP-IP model. However, the main deployment challenge for these schemes is still to provide a compelling reason to switch from the existing IP infrastructure (which is rapidly improving in performance over time) while maintaining backwards compatibility with as many of the useful services built on TCP/IP as possible. In the end, higher performance on high bandwidth-delay product networks may be a good reason to switch away from TCP, but we're far from a point where this matters for most users in the Internet yet (Comcast, if you're deep-packet-inspecting this, it is meant at you!).

Wednesday, September 10, 2008

Core-Stateless Fair Queueing

This paper solves one of the main issues with fair queueing - the cost of maintaining per-flow state - by showing that it is sufficient to maintain state at the edge routers and have the larger core routers run a stateless algorithm. This would enable much wider deployment of fair queueing because the border routers that maintain per-flow state don't need to be nearly as fast as the central ones. The core-stateless fair queueing algorithm achieves this by approximating the behavior that would occur with fair sharing. First, edge routers compute a rate of arrival for each flow, and mark packets from it with this rate. Second, core routers use FIFO queueing and a probabilistic drop algorithm to drop packets based on the proportion of packets that would have been dropped from each flow under a fair sharing discipline. There are a number of mathematical heuristics used to approximate this, but in the end, the process appears to work reasonably well, showing sensible results in simulations.

This work is interesting both because it enables something that previously seemed intractable (fast fair sharing) and because the general idea, minimizing logic in the core of the network, is powerful and perhaps more widely applicable. The idea in CSFQ is somewhat reminiscent of the end-to-end principle, except that trusted network nodes (the edge routers) take the roles of endpoints for the purpose of congestion control, and the reason for removing logic from the center is performance, not just good design. However, some of the design advantages are there - for example, the edge routers can be reprogrammed to support a variety of forms of sharing based on different definitions of flow, without modifying the core routers. Similar marking schemes have been proposed for security in the Internet (identifying sources of malicions flows and preventing DOS attacks).

The paper is lacking a bit in the evaluation section, first because CSFQ sometimes does poorly and it would be nice to characterize exactly when this happens, and second because there is no implementation. I'm not sure how easy it would have been to use Click or NetFPGA at the time this was written, but having a demo of CSFQ at "line rates" would have been very convinging. The work also does not address one of the issues that has really plagued QOS research, namely deployment, though it makes design of QOS-supporting routers more feasible.

The math in the paper also includes a number of approximations, and there's a risk that these may interact poorly. Because the system is pretty complex, the only way to really be sure is to run more simulations, perhaps trying different estimaton algorithms, drop algorithms, etc.