Tuesday, October 7, 2008

Multi-Hop Wireless Routing

In continuation of the multi-hop wireless discussion from previous posts, I'm discussing some salient points from two papers, A High-Throughput Path Metric for Multi-Hop Wireless Routing [ETX] and A Performance Comparison of Multi-Hop Wireless Ad Hoc Network Routing Protocols [COMPARE].

Again, the motivation for researching routing policies for multi-hop wireless networks should be clear ... the problem changes drastically when you move away from the typical access point wireless communication (wireless communication is not more than one hop).   

The authors of [COMPARE] evaluated four different routing protocols based on three metrics: packet delivery ratio, routing overhead, and path optimality. Packet delivery ratio is exactly like what it sounds like and comparable to link loss ratios in [ETX] (which will be discussed shortly). Routing overhead is exactly what it sounds like as well. Path optimality is an interesting metric because it, as of this paper: "in the absence of congestion or other 'noise', path optimality measures the ability of the routing protocol to efficiently use network resources by selecting the shortest path from a source to a destination".

Before I divulge on the results of [COMPARE] I feel it is a fair time to motivate [ETX], whose premise was exactly: the most efficient paths through multi-hop networks may not always be the shortest ... i.e. shortest path is a bad metric for path optimality. The authors of [ETX] provide examples of such scenarios, but the crux of the problem comes down to the fact that not all wireless links are high-throughput and lossless. Rather, they again reinforce an important point: a single hop that delivers only 50% of packets might be less useful as two hops that each deliver 100% of packets.

In [COMPARE] the authors allude to the possible problems of shortest path optimality as "congestion or other 'noise'". It turns out, as was shown in [ETX], that there is a lot of lossy links ... a.k.a. links that suffer from a lot of 'noise' (interference, etc). In addition, many of these links are asymmetric. That is, sending packets one direction has a higher delivery ratio than the other direction. This is clearly an issue with respect to most wireless protocols because while data may only be sent in one direction, an ACK must be sent in the other direction. Ultimately the authors of [ETX] designed a new protocol called ETX (Expected Transmission Count) that is based on delivery ratios, asymmetry in the delivery ratios, and interference over longer routes.

A few more thoughts:
  • The authors of [COMPARE] claim that wireless networks have a fundamental limitation to wired networks for sending broadcast packets due to the fact that there is no medium to reserve for all "nodes in proximity". Two thoughts here: (1) it seems like you could augment the RTS/CTS scheme to allow for a node to broadcast a message to all nodes that can hear the RTS/CTS; (2) the multi-hop wireless protocols of Roofnet don't use RTS/CTS either.
  • The authors of [COMPARE] focused their studies on mobility and movement (which naturally changed the network topology) while the authors of [ETX] have a more subtle assumption that the wireless nodes are stationary (they at least assume this in Roofnet).
  • DSR (dynamic source routing) seemed to be the best candidate for environments like those simulated in the [COMPARE] paper (highly mobile). 

Thursday, October 2, 2008

More on Wireless ...

Two more papers discussing wireless technologies, Modeling Wireless Links for Transport Protocols [MODELING] and Architecture and Evaluation of an Unplanned 802.11b Mesh Network [ROOFNET].

The authors of [MODELING] were intent on showing the dismal state of modeling and analyzing existing wireless deployments and suggesting alternative, hopefully better, characteristics to use for modeling. I found this study to be a bit dry, but I did have a few of the take-away points:
  • There is a definite tension between changing wireless links versus transport protocols. I actually alluded to this in a previous post where I mentioned the hurdle researchers have in the wireless space, because it is not clear where you need to make compromises for either the wireless protocols or the transport protocols.
  • TCP is not robust in the face of new link layer technologies. IN FACT, it is rather ironic that TCP is sensitive to packet reorderings! The original design goals of networks were to be robust in the face of lost links, lost packets, or packets traveling down different paths ... yet this is clearly not the case with TCP. IN ADDITION, TCP performs poorly when corrupted packets are received ... TCP has been over-optimized for link layers that are perfect (like ethernet). IN ADDITION, spurious timeouts due to link layer retransmissions are a severe problem and the transport protocols (like TCP) inflate transmit timers because they are agnostic of these link layer retransmissions (again, it seems that TCP has been over-optimized for an ethernet like link layer).  
  • The packet loss==congestion signal is inadequate in wireless networks because packet loss might be due to errors ... do we need more explicit signals?
  • A possible solution might be to push information about the link layers into the transport protocols (and maybe even vice-versa as well) ... but doesn't this break the nice abstraction we had before?

The authors of [ROOFNET] showed how an ad-hoc mesh network could be deployed using 802.11b technology. Interesting take-away points:
  • In the authors words, "the highest-throughput routes often involve links with relatively high link-level loss rates, since a single-hop route with 40% loss can deliver more data than a two-hop route with perfect links. In addition, because the 802.11b bit-rates are at roughly power-of-two intervals, a high bit-rate with up to 50% loss is preferable to the next-lowest bit-rate." Interesting!
  • Fast short hops are the best policy (as determined by their routing algorithm Srcr).
  • The majority of nodes use many of their neighbors ... I actually didn't quite understand this conclusion. Does this mean that the majority of nodes have constantly fluctuating best routes to gateways?
  • Multi-hop has a throughput advantage over long low-quality single-hop because it can exploit lots of short high-quality links ... and the overhead of retransmissions appears to be low enough.
  • Roofnet does not use RTS/CTS ... in fact they have shown that it does not improve performance in their network!
An interesting link between the two papers was that [MODELING] claimed that out-of-order delivery or corrupted delivery is shown to be beneficial for real-time applications by decreasing delay, and this is especially true when there are multiple wireless links in the path. However, because none of the connections tested in [ROOFNET] were of the real-time nature, they did not conclude the same thing nor did they show how a new transport protocol might have excelled in their network.

Tuesday, September 30, 2008

Wireless: Media Access Protocols and TCP Performance

This post covers two different papers:
  • MACAW: A Media Access Protocol for Wireless LAN's [MACAW]
  • A Comparison of Mechanisms for Improving TCP Performance over Wireless Links [COMPARE]
The authors of [MACAW], motivated by the proliferation of wireless devices, sought a way to engineer a media access protocol that performed better than existing multiple access congestion avoidance protocols (versus carrier sense protocols).

The authors of [COMPARE] were interested in how TCP could be tuned (or modified) to perform better over the broadcast medium of wireless links (i.e. assuming some fixed media access protocol).

It is interesting to see how, once again, TCP has become such a dominating network transport protocol that we are willing to sacrifice possible performance in order to augment it (as little as possible) to operate over emerging network technologies. In fact, it seems very likely that a new network technology (link-layer technology or transport-layer technology), even one that outperforms existing network technologies, that imposes a seriously difficult transition path for TCP will have a hard time being adopted. The authors of [COMPARE] do mention one new such technology, selective repeat protocol (SRP), but claim was not conclusive as a better alternative to TCP (although selective acknowledgment + TCP was).

It is not clear exactly what is the right level for abstractions and optimizations in the networking stack. Perhaps it is time to investigate how applications might actually perform better if they had a better understanding of the actual mediums that they were running on? Perhaps the applications themselves might better be able to take advantage of wireless networks by changing, for example, their sending patterns? Operating systems research has shown how applications that can take advantage of lower-level resources can often outperform those applications that rely on layers of abstractions (exokernel, scheduler activations, acpm, etc). Perhaps there is an analogue in the networking world?

An interesting aspect of [MACAW] was the investigation of the backoff counter. The authors conclude from their investigation that a backoff counter is needed for each station that a node is attempting to communicate with. In addition, all of the nodes communicating with that station need the same backoff counter in order to ensure fairness. (Digression: While I don't know enough about 802.11(a,b,g), I was not under the assumption that a station simultaneously communicated with more than one node (station), in which case, I'm curious how sophisticated the backoff mechanism needs to be.) I'm curious, given that I'm a frequent of coffee shops, how many of my "delayed" connections are due to backoff congestion, packet interference loss, versus TCP congestion control. (You know, when the network sometimes just stops responding and it is best to actually re-submit the url request ...)

(Hmm, I'm getting used to a new style of writing blog posts, less summary and more interesting thoughts from the paper to encourage feedback/conversation with others ...)

Monday, September 22, 2008

Scaling Internet Routers

In two papers from McKeown and others, "A Fast Switched Backplane for a Gigabit Switched Router" and "Scaling Internet Routers Using Optics", the authors explain how router technology can be scaled well beyond its current needs and close to its theoretic limits. One of the papers discusses how to scale routers for gigabit while the other one shows an impressive design for 100 terabit!

McKeown discusses how, in most routers then (circa 1995), datagrams are transmitted out of a first-come-first-served (FIFO) queue (which is crazy considering the numerous router/gateway algorithms that I have discussed in this blog). He does acknowledge "more advanced routers", but does not seem to imply that many of them actually perform many, if any, of the advanced algorithms such as Fair Queuing.

Both sets of authors describe the basic design of the router, including its parallel design, crossbar switch and use of virtual output queuing (VOQ). The VOQ discussion is especially interesting because it shows how traumatic head-of-line blocking can be (nearly 50% of performance).

McKeown describes how VOQ + iSlip (a crossbar scheduling algorithm) can achieve close to the theoretical maximum of performance. They compare this with a crossbar like router but one which uses FIFO (and variable-length datagrams ...). Ironically, when we relate this work to other work discussed on this blog it becomes apparent that none of the gateway algorithms are actually being used ...

Another rather interesting relation between this work and previous work discussed is its attention to "controlling delay". Specifically, to deal with traffic that needs to have low latency they employ two mechanisms: priority levels and speedup (the latter I think is much more fascinating!). Priority levels are what they sound like, but speedup is kind of clever: operate the crossbar switch twice as fast as the external line! That way, with sufficient speedup one could actually guarantee that every datagram is immediately transferred to its output port, where a departure time can be precisely scheduled (which will eliminate the non-determinism inherent in the router otherwise, which screws up ones ability to reason about delay). They go on to discuss how in theory one would need a speedup of N (where N is the number of ports) to actually achieve the guarantee, but how in practice one can actually get away pretty well with a speedup of just two.

Scaling of routers for gigabit was published sometime in the mid '90s (it was actually a description of the work McKeown did at Cisco for the Cisco 12000 router). The later paper (2003) discusses the terabit routing work, and emphasizes the need to use optics versus electornics (at least in some parts). I would be curious to know how necessary terabit routing really is today ...

More Congestion Avoidance (High-Bandwidth, High-Latency Networks) and Future Internet Design Issues (Real-Time Applications)

I've been absent for the past week (recovering from a concussion) and so for those reading in the blogosphere you will find a rather condensed version of my thoughts (and feelings) of the following papers:
  • Random Early Detection Gateways for Congestion Avoidance
  • Congestion Control for High Bandwidth-Delay Product Networks
  • Fundamental Design Issues for the Future Internet
  • Supporting Real-Time Applications in an Integrated Services Packet Network: Architecture and Mechanism
As the title suggests, these papers address two distinct topics: congestion avoidance/control and future internet design considerations (especially for latency intolerant applications).

The former, congestion avoidance and control, has been discussed to great detail in some previous posts and these authors found yet more issues with existing techniques. Random Early Detection (RED) gateways were found to be effective (if used with cooperating end-nodes) at doing congestion control by doing something rather remarkable: they choose a connection to "throttle down" with the probability equal to the connection's share of the bandwidth! (Note that this still avoids biasing bursty traffic.) I find this to be a nice little result ...

Of course, if Fair Queuing wasn't good enough, Core-Stateless Fair Queuing wasn't good enough, then there is no reason to believe Random Early Detection should be good enough. And it, for the most part, isn't. So, Katabi, Handley, and Rohrs propsed XCP (eXplicit Control Protocol). Briefly, they take ignore backward compatibility and consider a control theoretic design. For one, this means they decouple fairness and efficiency control and provide explicit congestion notifications (versus TCP which has no notifications but instead relies on a timeout which they assume implies a lost packet, i.e. congestion which may be either due to fairness or efficiency). 

The work of Katabi et. al. is especially interesting because it shows how poorly TCP scales with increased bandwidth and latency. These authors used satellite as the canonical example, however, I'm curious if we have actually approached similar limitations with the optic networks of today ... (in other words, how bad is TCP really? how bad is slow-start really?).

The subsequent topic was especially motivated by real-time applications. Such latency intolerant applications were not actually new (they had been doing speech-processing on the Internet since 1980's ... before I was born!), but they had accounted for much of the traffic in networks.

In Shenker's "Fundamental Design Issues ..." he discusses the need to extend the current architecture to include a new "service model". That way, flows that have special needs (i.e. real-time applications) can be treated differently than other latency tolerant flows (i.e. file transfer). He discusses a host of issues, but I found the discussion about how to "choose a service" most interesting. He expands on the issues with implicitly supplied services (the gateway chooses the service) and touches on the biggest problem (in my mind) with explicitly supplied services (the application chooses the service): abuse (applications might find ways to get better network utilization if they lie about their actual needs). Much to my enjoyment he proceeds to discuss "incentives", and how that might quell the issue (which turns into a discussion of pricing, etc).

I'm not sure that we really have done much of anything for real-time applications (at least not in the hardware, clearly, we have made improvements in the software), and so perhaps it is still a valid issue today.

Thursday, September 11, 2008

This paper attempts to resolve the complexity issues in implementing Fair Queueing inexpensively. In retrospect, it actually wasn't made that clear in "Analysis and Simulation of a Fair Queuing Algorithm" that FQ had such issues, so this paper is a nice continuation. Stoica et. al. propose that one can perform some decentralization and push certain complexities out to the edges of networks which in turn will yield better overall performance while still being fair. (This seems to be a design pattern in systems ... not sure exactly which one it would be though).

The authors call their system core-stateless fair queueing because state is only maintained on the edges of network "islands", where the internal routers just use an augmented FIFO policy to do routing. The augmentation of the FIFO algorithm investigates packet tags added by the edge routers which can help determine which packets should be dropped in order to achieve fairness. 

Of the entire paper, I enjoyed Section 4 (Why Are Fair Allocations Important?) the most. As many of my other posts have mentioned, the efficacy of many of these algorithms have in some way relied on cooperation! As the authors go on to discuss, "it seems unsound to base the Internet's congestion control paradigm on the assumption of universal cooperation". YET, they go on to show how, at least for the allocation approach, the algorithms provide a strong incentive for the users of the system to provide some form of responsiveness to congestion control! This is a cool result to me ... of course, this was for drop-intolerant applications. To provide incentives for drop-tolerant flows it may also be necessary to use some sort of punishment scheme.

Analysis and Simulation of a Fair Queueing Algorithm

The authors hypothesize that queueing algorithms play a crucial component in effective network congestion control because: (1) flow control is only helpful for ensuring the presence of free buffer space at a receiver and (2) adaptive routing is only helpful for pushing packets away from network congestion/bottlenecks. Queuing algorithms, they speculate, which are considered only helpful for controlling the order in which packets are sent and the usage of a gateways buffer space, can also affect the way in which different packets from different conversations interact with one another which ultimately will affect the collective behavior of flow control algorithms.

The authors discuss how the most common queuing algorithm, first-come-first-served (FCFS), essentially "relegates congestion control to the sources". They propose Fair Queuing (FQ) as an alternative which allows one to allocate all of bandwidth, promptness, and buffer space fairly. Not only will this allow fair usage of resources, but it also provides a lower delay to lower throughput sources (like Telnet applications). They claim this as one of the prominent features of FQ.

They do some interesting simulations and have some great takeaway points:
  • FQ by itself do not provide adequate congestion control; they must be combined with intelligent flow control algorithms to at the sources.
  • Ill-behaved hosts get much less than their fair share because they have dropped packets even though they still get charged for their throughput.
  • Moreover, FQ protects well behaved sources from their "uncouth brethren", which ultimately rewards good sources.
  • FQ provides incentive for sources to implement Jacobson and Karels or some other intelligent flow control, where as FCFS makes using these "sacrificial".
I especially enjoyed their conclusion on how the game-theoretic perspective is important, in fact perhaps even necessary, to achieve their goals. (Again, this is further justification of how a well specified cooperative environment can perform incredibly well!)

This paper was an enjoyable read and I recommend it remain part of the curriculum. If I had any criticism I would have hoped they did more simulations that included more than one gateway (to see how these mechanisms work across larger networks).

I also think this is a prime source of information for anyone interested in looking at how virtual machine monitors do networking since, essentially, they are are gateway/router of sorts.