Slashdot Mirror


Network Algorithmics

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.

55 comments

  1. oh please by imsabbel · · Score: 5, Insightful

    "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.

    --
    HI O WISE PRINCE. WHT TOOK U SO DAM LONG?
    1. Re:oh please by $RANDOMLUSER · · Score: 4, Funny

      Did it really say that?
      I only skimmed the review.

      --
      No folly is more costly than the folly of intolerant idealism. - Winston Churchill
    2. Re:oh please by __aaclcg7560 · · Score: 4, Funny

      What said what?
      I only skimmed the last comment.

    3. Re:oh please by Breakfast+Pants · · Score: 1

      Exactly. While I don't doubt that some reviewers don't read everything they review, I've never seen one admit it like that.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
    4. Re:oh please by Rakshasa+Taisab · · Score: 1

      OMG, I actually did all the former in addition to guessing the content of yours. /. just doesn't suprise me anymore.

      --
      - These characters were randomly selected.
    5. Re:oh please by Lord+Omlette · · Score: 1

      The next question, I guess, is how many of the other 900 reviews went the same way?

      --
      [o]_O
    6. Re:oh please by Anonymous Coward · · Score: 0

      He didn't have time to finish because he had to rush off to write one of his other 900 unread book reviews.

    7. Re:oh please by eh2o · · Score: 1

      I'm guessing the reviewer meant "I've only skimmed part 3" in the sense of "I've read the rest of the book but only skimmed through this part"...

      Just a case of bad wording, they are not really *that* negligent.

    8. Re:oh please by g1zmo · · Score: 1

      Huh? Who's talking?

      --
      I have found there are just two ways to go.
      It all comes down to livin' fast or dyin' slow.
      -REK, Jr.
    9. Re:oh please by Kuvter · · Score: 1

      But there in lies the catch 22. If he read them all, he wouldn't have had the time to write 900+ reviews.

      --
      "To be is to do." --Socrates
      "To do is to be." -- Aristotle
      "Do-Be-Do-Be-Do..." --Sinatra
    10. Re:oh please by __aaclcg7560 · · Score: 1

      Better yet, who's on third? :P

  2. Maybe I'm reading this wrong... by __aaclcg7560 · · Score: 1

    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

  3. Re:As a Jaffa, by MindStalker · · Score: 0, Offtopic

    I had to lookup ECW on Sci-Fi.

    I am now terrified.. Unless there is lasers comming out of their freaken heads.

  4. target audience by l3v1 · · Score: 0

    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 optimization of networking code, say in the Linux kernel.

    I hope those who build those devices and work on optimizations in those codes have better education than such. For amateurs and generally interested, fine. But honestly, one who doesn't have the background and doesn't even have read the thing, pretty bald recommendations are made up there. In fact this review has been good: it saved me time since I know now that it'd be a waste of time.
     

    --
    I am putting myself to the fullest possible use, which is all I can think that any conscious entity can ever hope to do.
    1. Re:target audience by angio · · Score: 3, Informative

      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 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.

  5. Bald recommendations? by Anonymous Coward · · Score: 0

    I find your ideas fascinating and would like to subscribe to your newsletter.

    1. Re:Bald recommendations? by Anonymous Coward · · Score: 0

      Done and Done!

  6. In other news by donaggie03 · · Score: 2, Insightful

    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"

    --
    Three days from now?? Thats tomorrow!! ~Peter Griffin
    1. Re:In other news by karnal · · Score: 1

      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.

      --
      Karnal
    2. Re:In other news by donaggie03 · · Score: 2, Funny

      Hey I never said the system was perfect.

      Your concerns will be addressed in TrafficStop 2.0 :)

      --
      Three days from now?? Thats tomorrow!! ~Peter Griffin
    3. Re:In other news by karnal · · Score: 1

      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.

      --
      Karnal
    4. Re:In other news by Anonymous Coward · · Score: 0

      Actually, transportation science concerns economics, civil engineering, urban planning, vehicle engineering, and also makes use of social sciences, applied mathematics and computer science. And yes, there are many books written about different aspects of transportation planning, from practical to highly theoretical. Improving the highway system is certainly at least as challenging as improving computer networks.

  7. Network Analytics book review by dougbaker · · Score: 5, Interesting

    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.

  8. Hmm, interdisciplinary by Colin+Smith · · Score: 1

    Something traffic planners should read I reckon.

    --
    Deleted
  9. oh please-Punctuation. by Anonymous Coward · · Score: 0

    And I got the leftovers.

  10. Here is a review from Cisco.com by viking2000 · · Score: 5, Informative

    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

    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

  11. Who Varghese is by slashdotmsiriv · · Score: 4, Informative

    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.

    1. Re:Who Varghese is by Anonymous Coward · · Score: 0

      I had Varghese as one of my profs. at UCSD. He was one of my best profs. I actually enjoyed going to office hours and talking networking, ... He was very approachable and actually seemed to care about the student. Keep up the good work.

  12. Hey by solid_liq · · Score: 1

    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?

    1. Re:Hey by kfg · · Score: 1

      I won't mention any names here...

      Bill Joy?

      KFG

    2. Re:Hey by Doctor+Memory · · Score: 1

      BSD was hardly a major operating system at that time. A major research system, maybe.

      --
      Just junk food for thought...
    3. Re:Hey by kfg · · Score: 1

      Until Bill rewrote the stack and Berkeley offered it to the public, although the interested public was admitedly rather small.

      KFG

  13. Brilliant man by pestilence669 · · Score: 0, Redundant

    I've worked for this man. He seriously knows what he's talking about.

  14. one-pass algorithms? by Gospodin · · Score: 2, Interesting

    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/.

    --
    ...following the principles of Heisenburger's Uncertain Cat...
  15. When will people learn... by Anonymous Coward · · Score: 0

    The 'rithm method just does not work. *bang head*

    1. Re:When will people learn... by Anonymous Coward · · Score: 0

      That's not what yo' momma said!

  16. Morgan Kauffman by jefu · · Score: 1

    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.

    1. Re:Morgan Kauffman by moro_666 · · Score: 1

      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 expected case (use caches);

      I wish that those m$ zombies would have paid more attention to the other points in the book too :(

      --

      I'd tell you the chances of this story being a dupe, but you wouldn't like it.
  17. Latency by wildsurf · · Score: 1

    Modern network devices have to handle traffic in huge volumes at low latencies

    HIGH latencies. Networks have HIGH latencies. Come on now, editors.

    --
    Weeks of coding saves hours of planning.
    1. Re:Latency by c.scrim · · Score: 1

      HIGH latencies. Networks have HIGH latencies. Come on now, editors.

      I think he means "... handle traffic in huge volumes while providing low latencies."

    2. Re:Latency by Anonymous Coward · · Score: 0

      >> Modern network devices have to handle traffic in huge volumes at low latencies
      > HIGH latencies. Networks have HIGH latencies. Come on now, editors.

      You'd assume the author was talking about internal latencies of networking devices (like switches) that nowadays operate at wirespeed with latencies equaling to time required to transmit the VLAN tag and MAC-addresses (20 bytes?). Individually network devices have low latencies but when dealing with multiple hops and overloaded lines (equals buffering equals latency or at worst drops) latencies add up, but that's beyond any individual device.

  18. useful for programmers by Vesuvius · · Score: 3, Interesting

    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 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.

  19. UCSD by ShakaUVM · · Score: 1

    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. ;)

  20. Network Analytics book review -from another reader by dinuraj · · Score: 1
    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 manufactures including Cisco, Juniper, Procket etc. Lot of research papers can be found in his homepage.

  21. Grammar nazi by Anonymous Coward · · Score: 0
    Almost makes me proud to be an alumni. ;)

    And he asked him, What is thy name?
    And he saith unto him, My name is ShakaUVM; for we are many.

  22. nice by TheLibero · · Score: 1

    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

    --
    "Evil thrives when good men do nothing"