Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Network Algorithmics 55

danny writes "Modern network devices have to handle traffic in huge volumes at low latencies; achieving this requires ideas and approaches from all of computer science: hardware, algorithms, protocols, software engineering and their integration in a discipline which Varghese calls "network algorithmics". Read the rest of Danny's review.
Network Algorithmics: An Interdisciplinary Approach to Designing Fast Networked Devices
author George Varghese
pages 465
publisher Morgan Kaufmann
rating 9
reviewer Danny Yee
ISBN 0120884771
summary pulling out all the stops to fix bottlenecks


After an introduction in chapter one to bottlenecks and techniques for avoiding them, Varghese provides a brief overview of protocols, hardware, network architectures, and operating systems, with examples, in chapter two. This is best suited as a refresher: Network Algorithmics assumes a general familiarity with networking protocols, operating systems and computer architecture, and if used as a text would be suitable for higher undergraduates. (The exercises at the end of each chapter are often open-ended.)

Chapter three introduces the fifteen implementation principles that are the core of Network Algorithmics: P1 Avoid obvious waste; P2 Shift computation in time (precompute, evaluate lazily, share expenses or batch); P3 Relax system requirements (trade certainty or accuracy for time, shift computation in space); P4 Leverage off system components (exploit locality, trade memory for speed, exploit existing hardware), P5 Add hardware (use memory interleaving and pipelining, use wide word parallelism, combine DRAM and SRAM effectively); P6 Create efficient specialized routines; P7 Avoid unnecessary generality; P8 Don't be tied to reference implementation; P9 Pass hints in layer interfaces, P10 Pass hints in protocol headers; P11 Optimize the expected case (use caches); P12 Add state for speed (compute incrementally); P13 Optimize degrees of freedom; P14 Use bucket sorting, bitmaps; and P15 Create efficient data structures. Chapter four presents fifteen problems that illustrate these principles in action, with hints to solutions.

Part II of Network Algorithmics is devoted to end-nodes. A chapter "Copying Data" takes a web server, delivering files from disk to network, as the prototype, and explores different approaches to reduce pressure on the memory and I/O bus by reducing the number of copies required: copy-on-write, fbufs, RDMA, IO-Lite, and more. It also touches on making cache use more effective and the tantalizing possibilities of "integrated layer processing".

"Transferring Control" looks at minimizing scheduling overhead and maximizing concurrency: at context-switches, processes, threads, and event-driven servers. It evaluates the existing Unix select() call and considers ways of speeding it up, with and without changing the API. And it touches on ways of avoiding system calls and reducing interrupt overhead.

There are three shorter chapters. "Maintaining Timers" explores hashed and hierarchical timing wheels, the BSD implementation, and fine granularity. "Demultiplexing" looks at the development of packet filters: CMU/Stanford, Berkeley, Pathfinder, hardware, and Dynamic (generating filter code in real time). And "Protocol Processing" looks at some miscellaneous tasks that can become bottlenecks: buffer management, CRC checks and checksums, TCP and UDP protocol processing, and packet reassembly.

So far I've only skimmed Part III, "Playing with Routers". This has chapters on "Exact-Match Lookups", "Prefix-Match Lookups", "Packet Classification", "Switching", "Scheduling Packets", and "Routers as Distributed Systems". And Part IV offers chapters on "Measuring Network Traffic" and "Network Security", along with a summary and overview.

Varghese gets right down into the details in some places, but he sets the material he covers into its broader context. He often takes a historical approach, looking at how implementations have been driven by changing requirements. And he stresses that only with a broad view can the overall costs and possible optimizations be seen: with web server performance, for example, it is necessary to consider "the whole system, from HTTP and its headers, to the file system, and down to the instruction caches". Where many computing disciplines emphasize the isolation of components, network algorithmics stresses links across layers and boundaries. (It's not overdone, but approaches and principles are often illustrated with analogies to ordinary life serving tables in a restaurant, for example or parallels with other areas of computing.)

Purists might find the practical approach of network algorithmics distressing Varghese admits that it "may seem drab and shallow" compared to "the beauty of theoretical techniques" but it has an attraction all of its own. I've often felt that "computer science" as commonly constructed lacks any coherence, spanning everything from nearly pure mathematics to hardware and engineering, but Network Algorithmics has made me rethink that.

Little in Network Algorithmics is relevant to my job as a system and network administrator I just plug switches in and configure them, and don't have to worry about their internals but I found it fascinating. Apart from curious general readers with a computer science background, or hackers who enjoy stretching their minds, the obvious audience is anyone building high-performance network devices or looking at optimization of networking code, say in the Linux kernel.

Danny Yee has written over 900 other book reviews."


You can purchase Network Algorithmics: An Interdisciplinary Approach to Designing Fast Networked Devices from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

Network Algorithmics

Comments Filter:
  • oh please (Score:5, Insightful)

    by imsabbel ( 611519 ) on Monday August 21, 2006 @04:33PM (#15951095)
    "So far I've only skimmed Part III, "Playing with Routers"."
    dear danny,
    Next time, wait until you actually READ the book before writing a review.
  • So this is a review of "Network Orgasm"? It's about Hugh Hefner and his three blond girlfriends? Now that's a network to run. :P
  • I've often felt that "computer science" as commonly constructed lacks any coherence, spanning everything from nearly pure mathematics to hardware and engineering, but Network Algorithmics has made me rethink that.

    Ok, first sign that this is a book more in the "magazine" style than in the "scientific" style.

    Apart from curious general readers with a computer science background, or hackers who enjoy stretching their minds, the obvious audience is anyone building high-performance network devices or looking at
    • Re:target audience (Score:4, Informative)

      by angio ( 33504 ) on Monday August 21, 2006 @09:09PM (#15952744) Homepage
      Before you jump to conclusions, keep in mind that Varghese is one of the leading experts in the design of routing algorithms and similar topics. Take a peek at his industrial impact [ucsd.edu] list; he's not kidding. The fast route lookup algorithm he developed while at WUSTL was, along with some work done concurrently at Lulea university in Sweden, the most major advance in fast route lookup algorithms in about a decade. In other words - don't judge the book by the qualifications of someone who decided to review it.

      Though the reviewer is right - many of the algorithms in the book would be useful in software-based routers, though there's room for caution: some of them are encumbered by patents of various sorts, and are recent enough that they'll remain so for a while.
  • In other news (Score:2, Insightful)

    by donaggie03 ( 769758 )
    Modern interstate highways have to handle traffic in huge volumes at low latencies; achieving this requires ideas and approaches from all of science: hardware, algorithms, traffic laws, automobile engineering and their integration in a discipline which Donaggie03 calls "traffic algorithmics"
    • by karnal ( 22275 )
      You have obviously never been in a "large city" on this "interstate highway" during "rush hour". Huge volumes of traffic, but the latency keeps spiraling out of control.
      • Re: (Score:2, Funny)

        by donaggie03 ( 769758 )
        Hey I never said the system was perfect.

        Your concerns will be addressed in TrafficStop 2.0 :)
        • by karnal ( 22275 )
          It's fun in my city (Columbus, Ohio) - land of people who get pissed at waiting in traffic for 5 minutes!!!

          OH NO THE HORROR!

          Of course, there are times it gets on my nerves too, but then I think about having a commute in say, Chicago... I hear it's horrible.
  • by dougbaker ( 934517 ) on Monday August 21, 2006 @05:14PM (#15951350)
    I too have read this book, and it remains one of several that is open somewhere under all the clutter on my desk. Since I write network applications, mostly in the monitoring
    and traffic analysis space, for a living such things are of keen intrest to me. I can
    thus recommend it without reservation.
    • I have read the book and liked it very much.. I write drivers and applications on routers of a reputed company and encounter the problems mentioned in the book almost on a day-to-day basis. The algorithms and case studies in book are really good and they are valid in the present state of network devices. I would recommend this book any engineer working on networking devices and applications.

      In addition, the products George Varghese's research work were implemented by different network device manufacture

  • Something traffic planners should read I reckon.

     
  • by viking2000 ( 954894 ) on Monday August 21, 2006 @05:37PM (#15951526)
    Seems this same book was reviewed by someone who actually read it:
    http://www.cisco.com/web/about/ac123/ac147/archive d_issues/ipj_8-3/book_review.html [cisco.com]

    and i copy:

    Book Review
    Network Algorithmics
    Network Algorithmics: An Interdisciplinary Approach to Designing Fast Networked Devices, by George Varghese, ISBN 0120884771, Morgan Kaufmann, 2004.

    This is not a generic algorithms book (that is, it does not overlap much at all with Sedgewick or Coleman as an introduction to algorithms), nor is it a typical introduction to TCP/IP networking book (for example, there is no chapter defining the TCP/UDP/IP header fields, thank goodness). It might best be described as an algorithms analysis book set in the context of networking and also in the context of implementations that mix hardware and software solutions. For those familiar with Radia Perlman's book Interconnections, I found aspects of the writing style and approach to be similar. George Varghese--in addition to having been a networking professor for many years--has had a lot of industry experience from licensing algorithms to networking companies, to consulting with Procket Networks in the company's early days of architecting its core router, to starting a security company that was recently acquired by Cisco Systems. I have been doing architecture work at Cisco for several years and can say that George's book has real grounding in how systems are built and analyzed today.

    Organization
    Chapter 2 presents abstractions for networking protocols, hardware design, routers, memory technology, and Internet end nodes (servers). This is a great introduction into "systems" thinking. In section 2.2.7, "Final Hardware Lessons," one thing I thought George should have mentioned along with metrics of chip size, speed, I/O, and memory is power. Power is becoming a major systems concern in many platforms and deserves mention as an optimization constraint.

    Chapters 3 and 4 go through a list of 15 implementation principles to use in approaching algorithmic design in systems and then give examples of these principles in action. What I find interesting about this section is that from working with George in the past, he really does believe and practice "principle"-based architecture thinking. I remember discussing several of the principles with him several years ago, and you can see how his many years of experience working in the networking field have shaped these principles. Many have probably employed some of these, but as George says in the chapter introduction, having them explicitly documented with examples is useful to help clarify our thinking. Some of the principles (and both the short examples in this chapter as well as examples cited in more detail in later chapters) are really fundamental, and I think reading through examples helped clarify in my mind when to use them.

    Chapter 5 covers copying data, for example, in a server design. I really like this type of chapter, in which a subject (in this case the effect of packet copying on Web server performance) is explored in detail but with a focus on where algorithms and systems design play an important part.

    My biggest question about this chapter is that I was unsure how applicable this is to, say, modern server design using Linux and with latest Gigabit Ethernet network-interface-card (NIC) designs. I know there was a lot of interesting work in the late 1990s, but this chapter without any data is more along the lines of an extended example of how to apply implementation principles.

    Chapters 6 through 9 are not what I would consider the meat of the book; they treat the topics of implementation and analysis for servers, timers, parsing/classification of packets, and buffer management (memory allocation).

    Chapter 10 covers exact match lookups. There is not a lot of meaty algorithmic discussion, but the history of scaling performance of bridges is used to
  • Who Varghese is (Score:4, Informative)

    by slashdotmsiriv ( 922939 ) on Monday August 21, 2006 @05:43PM (#15951577)
    For the record, George Varghese is professor at University of California, San Diego at the dpt of Computer Science.

    His research has been extremely influential in both academia and industry.

    Among the numerous of his papers that introduced novel and complete solutions to difficult networking problems,
    is for example "Trading Packet Headers for Packet Processing", which introduced the concept of tag/label switching,
    what is mostly known to us today as MPLS.
  • What, no information as to why rebuilding your TCP/IP stack from scratch and immediately releasing it with a major operating system to the public as being more secure is a bad idea? I won't mention any names here... Hey, have you been to Redmond, Washington lately?
    • by kfg ( 145172 ) *
      I won't mention any names here...

      Bill Joy?

      KFG
      • BSD was hardly a major operating system at that time. A major research system, maybe.
        • by kfg ( 145172 ) *
          Until Bill rewrote the stack and Berkeley offered it to the public, although the interested public was admitedly rather small.

          KFG
  • Brilliant man (Score:1, Redundant)

    I've worked for this man. He seriously knows what he's talking about.
  • one-pass algorithms? (Score:2, Interesting)

    by Gospodin ( 547743 )

    When I read the title of this book, I expected it to be about efficient one-pass algorithms, i.e. ones that you can do quickly on a stream of network information without using a ton of memory or CPU time per packet. I took a course in grad school a few years back about this, and it's a pretty interesting (and relatively recent) subject. You can read more about it here (home page of my prof): http://www.cs.rutgers.edu/~muthu/ [rutgers.edu].

  • I have not read this book, but as a general rule, Morgan Kauffman is an exemplary publisher. hey seem to choose excellent authors and editors. The books are most often well produced and when I buy one it usually ends up being a long term keeper. Just as well, as they also tend to be pricey. Indeed, MK is one of the few publishers from whom I'll purchase a book of interest without actually physically examining it.
    • He may be a wise man, but his boat obviously has fed the developers of IE ... snippets that match and that we sometimes all hate :)

      P2 Shift computation in time (precompute, evaluate lazily, share expenses or batch);
      P3 Relax system requirements (trade certainty or accuracy for time, shift computation in space);
      P4 Leverage off system components (exploit locality, trade memory for speed, exploit existing hardware),
      P7 Avoid unnecessary generality;
      P8 Don't be tied to reference implementation;
      P11 Optimize the exp
  • Modern network devices have to handle traffic in huge volumes at low latencies

    HIGH latencies. Networks have HIGH latencies. Come on now, editors.
    • by c.scrim ( 991741 )
      HIGH latencies. Networks have HIGH latencies. Come on now, editors.

      I think he means "... handle traffic in huge volumes while providing low latencies."
  • by Vesuvius ( 14201 ) on Tuesday August 22, 2006 @01:38AM (#15953683)
    I primarily bought this book for the very interesting treatment of data structures for storing large numbers of IP addresses and CIDR networks. Having already worked with the LCTrie http://www.nada.kth.se/~snilsson/public/papers.htm l [nada.kth.se] to deal with very large numbers of networks, I found the discussion of Lulea vs. LCTrie and other formats quite useful. The fact that I don't do hardware level work didn't make those sections any less interesting.
  • Yet another UCSD post. Last one was the guy who made a saw that wouldn't chop off your fingers, and before that it was the Chez Bob (Prof Savage) in the CSE Grad lounge.

    Almost makes me proud to be an alumni. ;)
  • this is a great review for what it seems like a great book. i can't understand why it hasn't got that much of interest :O

One man's constant is another man's variable. -- A.J. Perlis

Working...