Monday, November 24, 2008

Improving MapReduce Performance in Heterogeneous Environments

I obviously can't give an unbiased view on this paper, so I'll use this as an opportunity to list all the things we could've done which would have improved the work:
  1. Comparison of LATE versus a progress-rate based approach to detecting slow nodes, rather than just saying "those won't work" based on an example. While it's true that giving one example of how progress-rate approaches may speculate the wrong tasks is enough to recommend not using them in practice, Hadoop's scheduler has some glaring problems, so it would be nice to see how well LATE does vs a more reasonable scheduler.
  2. Analysis of the contribution of each part of LATE - how much do we gain from the cap, slow node threshold, slow task threshold, etc? These are interesting questions we could answer to contribute to the "science" aspect of the paper, but we didn't have enough time and space.
  3. LATE doesn't take into account the amount of data each task has to process yet. We say that in a well-behaved MapReduce job, tasks should have roughly the same amounts of data. This is easy for mappers because they use a single input chunk. It's harder for reducers, however, because you may have popular keys which get more data than others. In this case, reportng some information about total amount of data for this reducer would solve the problem (and LATE would have to be modified to launch a backup only if the backup node's progress/byte/sec is higher than the original node's).
  4. LATE is still "reactive" in that it launches tasks at all available opportunities and only then corrects if it has some stragglers. It might be interesting to have a "proactive" scheduler which plans which nodes to use in advance. Of course nodes' characteristics change over time so this may have some pitfalls.
  5. Evaluation with a more realistic benchmark. Sort, grep and wordcount are actually pretty representative of real-world workloads, and in fact the gridmix benchmark from Yahoo consists of just sorts and scans, but it would be nice to have some real computation.
I think there's a lot of exciting work left to do in MapReduce scheduling, even beyond backup task scheduling. This paper managed to identify a real problem, analyze the pitfalls, and come up with a simple solution, but it's not the be-all and end-all of scheduling. Obviously using more information about task data sizes, better estimation of finish times, etc would help. We just focused on bringing the problem to the attention of the research community and finding the right way to think about it (in terms of finish times, not progress rates). Future work on scheduling can also look at aspects beyond backup tasks, such as data locality, fairness between users, etc. I'm doing some of that this term. However, it might be harder to state these problems as clearly as that of backup tasks. Another thing that is really lacking is a realistic MapReduce benchmark. Andy and I are working with folks from Yahoo and Facebook to try to establish one.

A Policy-aware Switching Layer for Data Centers

This paper proposes managing middleboxes in data center and enterprise networks through logic in the switching layer rather than physical placement of middleboxes. The basic idea is simple - have a policy that propagates to the switches and lets them route packets through middleboxes in whatever order they wish to before delivering them to their destination. The difficult part is the details, and this paper does a very good job covering those, in contrast to some pure architecture papers we've read. The end result is a very compelling way to manage networks.

The authors provide a good overview of the different types of middleboxes that will be present in a data center and of the problems in trying to manage them by just placing middleboxes on the path. This was very useful to see because the situation is more complicated than it might appear at first due to redundant links. Apart from the basic design of the policy-aware switching layer, which is to look at tuples of header fields to route packets, the authors also focus on how to support redundant middleboxes (consistent hashing) and how to deal with changes in policy and topology without violating the policies. The latter is especially important for middleboxes that provide security, such as firewalls. Some other students' blogs have suggested dropping packets on a policy change, but a correlated set of drop events could really confuse some applications, and there is also no way with that technique to fully guarantee that some won't be mishandled if they are delayed a bit. Better to provide some guarantees as long as this does not overcomplicate the system.

The main thought I get after reading this paper and X-Trace is "wouldn't it be nice to have some extra fields per frame where we could tag things". It's too bad that IP options never really took off, because they would be very useful. With a way to mark packets and a simple way to push policies to switches, you can get a pretty nifty "network OS" that will let you manage your flows without requiring excessive state or forwarding logic at the switches. OpenFlow and NOX promise to bring something like this.

Thursday, November 20, 2008

Scalable Application Layer Multicast

This is multicast over an overlay network - an obvious goal to go for if you want to create deployable multicast systems because it became clear that the routers in the Internet were unlikely to be updated to support new multicast protocols. The actual implementation of application-layer multicast here is rather complicated, involving creating a tree of clusters of nodes with some mathematical properties about number of levels and number of nodes per cluster. There are even a set of invariants (section 2.4) that must hold. My first thought is, this is way too complicated. You will pay a lot more to keep up such invariants than you would if you had a more organic network. Why not try out something extremely simple first, such as random neighbors and gossip? (Note: this idea was inspired by Ari's blog). Why not just build multiple non-clustered threes? People complained about the DHT papers focusing too much on nice mathematical properties, but those are very unorderly compared to the NICE trees in this paper. Apart from the fact that you'd imagine costs could be lower with a less restrictive topology, the other complication is that maybe there are corner cases when the tree invariants are not kept and cannot easily be restored. It's hard to prove that you've covered all the possibilities about simultaneous leaves and joins.

Apart from this, the paper contains simulations comparing it with another overlay multicast system called Narada and an implementation that ran with ~30 nodes. Having an implementation is good, but the scale is not particularly interesting - at 30 nodes, one can easily have a centralized server. The application considered - low bandwidth data streams - also adds to this since it means that a centralized server or data center may work well even for far more than 30 nodes.

A Reliable Multicast Framework for Light-weight Sessions and Application Level Framing

I had dreaded this set of readings because I disliked the multicast papers on the network prelim reading list, but this paper is actually pretty well-written. It explains why reliable multicast has to be solved differently from reliable unicast and pushes for receiving more semantics from the application (application-level framing). It explains that a one-size-fits-all reliable and ordered model is infeasible. It also motivates the work with a real application, wb, which manages to build a useful service from idempotent operations and reliable but unordered multicast. Finally, there is a lot of analysis of how to implement retransmission requests and recovery without imploding the sender through randomized backoffs. Although the simulations and analysis are not on Internet topologies, they do cover some "extremes" such as a chain or a star, so they are fairly believable. The most important point in the paper, in my opinion, is the recognition that different applications require different things from multicast, which leads the authors to build a simple base for reliable multicast protocols rather than trying to design a one-size-fits-all solution. This is reminiscent of how IP provides a simple service model over which more complex ones can be built by the application.

Of course the elephant in the room with all this is that multicast on the Internet is pretty much not present today. There seem to be three reasons: First, doing it in hardware would have required massive hardware changes, and nobody agreed how it really should be done. Second, and more importantly, providers didn't know how to charge for multicast! Not many papers address this. Third, we've managed to do all our multi-user communication stuff using central servers. You can get wb today: it's just all running in one data center, and you're accessing it through HTTP. The cost of building a central server is so small and the benefits in manageability, upgradeability, etc are so large that nobody has chosen to do the peer-to-peer whiteboard instead. We do see some peer-to-peer multicast communication for other applications, most notably multiplayer games (where relaying commands through a central server hurts latency), but these have few enough players that using all-pairs communication solves the problem. So SRM fits into that category of interesting ideas that lack implementation details and motivation.

Tuesday, November 18, 2008

A Delay-Tolerant Network Architecture for Challenged Internets

Although I'm confused by the term "challenged internets" (is it a politically correct way to say limited-connectivity networks?), I liked the way the way this paper was organized and the reasoning behind the architecture of DTN. The paper starts out with a good introduction of cases where connectivity may be limited or lacking at times, and these are things that people actually care about: military networks, communications through space, sensor deployments, and even "sneakernet" style store-and-forward networks, of which there are some commercial examples in developing regions. The paper also stresses the importance of interoperability in defining an architecture for such challenged networks, which can lead to a design that gets adopted and implemented by multiple manufacturers. The actual DTN system is designed in a very practical manner, with fairly simple design choices that are adequately explained, such as hierarchical names, overlays for implementaton (rather than requiring redesign of the current Internet), priority, custody transfer, end-to-end acks, and even cryptographic "postage stamps". I liked all the analogies to the postal service and to e-mail.

This paper is different from a lot of the papers we read recently because it's much closer to an RFC-like proposal of a new Internet standard than to a "what-if" architecture paper. This is valuable, as it's good to see how real protocols get designed. However, it makes me wonder about the following question: how often does the opportunity arise in research to define a protocol like this versus exploring more far-fetched ideas that push the boundaries of what technology can do? It seems like a lot of research is focused more on pushing the boundaries, leaving this kind of practical standards design work to industry. How do you know as a researcher when to spend time trying to design this kind of standard versus enabling some interesting demos, getting your viewpoint heard in industry, and then moving on?

An Architecture for Internet Data Transfer (DOT)

This paper looks at the benefits that could arise from turning data transfer on the Internet into a separate service, abstracting away transfer details from the application. This is part of a whole movement in Internet architecture towards a higher-level communication API, the point of which is to allow more innovation below the API than the current datagram and stream-oriented transport protocols allow. The DOT paper focuses solely on large bulk data transfers, in which case having a specialized transfer service provides the following advantages:
  • Simplifying application programming required to use complex transfer mechanisms.
  • Providing flexibility so as to support new transfer mechanisms in the future.
  • Taking advantage of caching and multipath to improve performance.
  • Providing disconnection tolerance and mobility tolerance.
Tests with a prototype show mainly that the DOT layer does not add significant overhead and that some interesting transfer mechanisms, such as multipath and USB key based, can be implemented on it. The implementation is mostly a "sanity check" rather than enabling some fantastic new applicaton.

My main criticism of the paper is that although the DOT design provides flexibility, there is not enough motivation for it to be practical. Very few applications seem to require the kind of flexibility that DOT provides, as most transfers are fast enough to happen over a single TCP connection or large enough that the user can manually choose whether to use BitTorrent or physical media. The examples provided in the evaluation are pretty contrived for this very reason - e.g. while the Internet Suspend/Resume project could clearly work over either a connection or an USB key, it's hard to imagine it ever needing to support some other tranfer mechanism, and an application developer could easily implement just these two. I believe that for an architecture paper like this to really be influential, it needs to provide not just a cleaner solution for one particular problem but an architecture that enables some fundamentally new and powerful applications. DOT focuses on too narrow a problem. If it were augmented with maybe some interesting naming system, some way to handle mobility, etc, it would be far more interesting. I had the same criticism for DOA.

Finally, I'd like to point out a thing which always bothered me about some Internet architecture papers, which is that their work could easily be implemented in a library. For something like DOT, which is more or less end-to-end, there probably are libraries today which will provide you an easy to use get/put API for HTTP, BitTorrent, SCP, etc. With such libraries available, do we really need a new service in the OS? Internet architecture work should focus on pieces that require innovation in how we think about networking vs requiring changes to how we componentize our software.

Thursday, November 13, 2008

X-Trace: A Pervasive Network Tracing Framework

This paper shows how a minimal amount of extra data in protocol messages can be used to trace execution of distributed systems and deterministically infer causality between events. The basic idea of X-Trace is that each event logged will include the ID of its parent, which is passed as a header in protocol messages. This allows both extending the tracing into systems that originally didn't have it or are owned by different administrative domains, and going down into lower layers of the networking stack. One nice aspect of X-Trace is that once the events are logged, they can be collected any time after the fact, or even sampled for traces that are particularly interesting; thus X-Trace can be used by mutually untrusted parties to debug problems without revealing all of their internal network events to eachother. Another nice thing is that log events don't have to be sent over the network, only small event IDs. Thus log events can contain many key-value pairs of interesting information, while event IDs are just a few bytes of overhead.

X-Trace has actually changed since this paper was written to produce a DAG rather than a tree. This makes it easier to understand what is going on in the trace by placing edges "up" from lower layers into higher ones.

The paper is also very good at listing the limitations of X-Trace, which is something we don't often see in papers. The main limitation is that X-Trace requires modifications to the application. It would be nice if some kind of program analysis could add these automatically! In practice, modifying just RPC and threading libraries may also be beneficial, especially in more limited programming languages such as Erlang.