1 / 38

CMPE 252A : Computer Networks

This lecture discusses Vivaldi, a decentralized algorithm for computing network coordinates, which allows hosts to predict the round-trip times (RTTs) to other hosts. The algorithm uses synthetic coordinate systems and introduces the notion of "height" to improve prediction accuracy. The lecture covers the centralized and distributed versions of the algorithm, as well as the evaluation methodology.

dwhipple
Download Presentation

CMPE 252A : Computer Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CMPE 252A : Computer Networks Chen Qian UCSC Baskin Engineering Lecture 20

  2. MIT CMU Stanford MIT Berkeley CMU Berkeley Stanford CMU MIT MIT CMU Stanford Stanford MIT MIT Berkeley Berkeley CMU CMU Stanford Berkeley Berkeley Stanford New Challenges • Large-scale distributed services and applications • Napster, Gnutella, End System Multicast, etc • Large number of configuration choices • K participants  O(K2) e2e paths to consider

  3. Role of Network Distance Prediction • On-demand network measurement can be highly accurate, but • Not scalable • Slow • Network distance • Round-trip propagation and transmission delay • Relatively stable • Network distance can be predicted accurately without on-demand measurement • Fast and scalable first-order performance optimization • Refine as needed

  4. Applying Network Distance • Napster, Gnutella • Use directly in peer-selection • Quickly weed out 95% of likely bad choices • End System Multicast • Quickly build a good quality initial distribution tree • Refine with run-time measurements • Key: network distance prediction mechanism must be scalable, accurate, and fast

  5. Global Network Positioning (GNP) • Model the Internet as a geometric space (e.g. 3-D Euclidean) • Characterize the position of any end host with coordinates • Use computed distances to predict actual distances • Reduce distances to coordinates (x2,y2,z2) y (x1,y1,z1) x z (x4,y4,z4) (x3,y3,z3)

  6. Vivaldi: A Decentralized Network Coordinate System Frank Dabek, Russ Cox, Frans Kaashoek, Robert Morris Presented by: Chen Qian

  7. A Solution • Synthetic coordinate systems allow Internet hosts to predict the RTTs to any other hosts. • The distance between the coordinates of two hosts should be an accurate predictor of the RTT. • These systems can be constructed by each host only communicating with a small set of other hosts.

  8. Vivaldi • Vivaldi is a simple, adaptive, de-centralized algorithm for computing network coordinates. • No low-dimensional coordinate space would predict RTTS exactly. • Internet latencies violate the triangle inequality. • Vivaldi introduces the notion height that improves the prediction accuracy.

  9. Prediction Error • Where • Lij: the actual RTT between nodes i and j • xi: the coordinates assigned to node i • ||xi-xj||: the distance between the coordinates of i and j • Minimizing the squared-error function is equivalent to minimizing the energy in a physical mass-spring network.

  10. Centralized Algorithm • Tries to minimize the error of predicted RTT values by simulating the movements of nodes under spring forces. 100 N1 N2 A single spring at rest 150 N1 N2 longer spring 50 N1 N2 shorter spring

  11. Algorithm By Hook’s Law: Scalar quantity: the displacement of the spring from rest Unit vector which gives the direction of the force on i. Force vector Fij can be viewed as an error vector, which has a direction

  12. Local minimum But the global minimum is not guaranteed. The system may come to rest in a local minimum. N1 N2 local minimum N3 N4 N5

  13. Local minimum But the global minimum is not guaranteed. The system may come to rest in a local minimum. N1 N2 lower error N3 N5 N4

  14. Centralized Algorithm • Calculate sum of forces on node i • Move a step in the direction of the sum of forces

  15. Simple Distributed Version • Continuously contact sample nodes • For each sample node • Calculate force (error change) of this sample • Move a step in the direction of the error

  16. Coordinates update Identical to the individual forces calculated in the loop of the centralized algorithm

  17. Adaptive Timestep • The main difficulty in implementing Vivaldi is ensuring that it converges to coordinates that predict RTT well. • If the timestep is too small, convergence is slow. • If the timestep is too large, convergence may fail. optimal optimal

  18. Adaptive Timestep • The system should obtain both fast convergence and avoidance of oscillation. • Simple adaptive timestep • Adaptive timestep to deal with large errors If the remote node has a large error, it should be given less weight than a remote node with small error.

  19. Algorithm with adaptive timestep Compute error confidence Update local error Adjust time step

  20. Evaluation Methodology • Latency data • Matrix of inter-host Internet RTTs • Compute coordinates from a subset of these RTTs • Check accuracy of algorithm by comparing simulated results to full RTT matrix • 4 Data sets (2 Measured, 2 Synthetic) • 192 nodes Planet Lab network, all pair-ping gives fully populated matrix • 1740 Internet DNS servers • Collect full matrix using the King method • Continuously measure pairs over a week and take the median value More geographically diverse at that time

  21. King’s method First DNS query is for a name in the domain of A. It returns the latency to A. Second query is for a name in the domain of B, but is sent initially to A. The difference between two queries is the latency between A and B

  22. King’s method • Take the median value, because King can report a RTT higher or lower than the true value if there is congestion. • About 10% of the original nodes were removed from the data • High load or queuing at name server A adds a delay that is significantly larger than the network latency. • The initial query (to A) and recursive query (via A to B) will require roughly the same amount of time and the estimated latency between them will be near zero.

  23. Setup • Simulation test setup • Input RTT matrix • Send a packet one a second • Simulator delays each transmission by ½ RTT time • Use measured RTT of the packets to update coordinates • Limitation of the simulator: RTTs do not vary over time; cannot model queuing delay or changes in routing

  24. Setup • Error definitions • Error of Link • Absolute difference between predicted RTT and measured RTT. • Error of Node • Median of link errors involving this node • Error of System • Median of all node errors A small proportion of nodes have large errors?

  25. Timestep choice • (a)Constant timestep: too small and too large values all cause large errors. • (b)Adaptive timestep: c=0.25 yields both quick error reduction and low oscillation.

  26. Timestep choice • 200 new nodes join a stable 200-node network • Constant timestep, new nodes may confuse the old nodes. The system need to be re-converged. • Timestep with weighted errors allows new nodes to find their places quickly.

  27. Communication pattern • Sampling only nearby nodes gives good local coordinates but poor global coordinates. • The second case allow nodes to contact distant nodes as well, improving the accuracy of the coordinates.

  28. Communication pattern • Put 4 close neighbors and 4 far-away neighbors. Each node chooses one of the far neighbors with probability p. • p = .5 quick convergence • p < .5 convergence slows. But similar accurate coordinates are eventually chosen.

  29. Adapting to network changes • Ability to adapt to changes in the network (tested with “Transit-Stub”) • At time 100 one of the transit stub links is made 10 time larger; after 20 s the system has re-converged. At time 300 the link goes back to its normal size and the system quickly re-converged to original error.

  30. Accuracy: Vivaldi vs. GNP How about communication cost?

  31. Model Selection • Almost any coordinate space satisfies the triangle inequality (the distance between A and C should be less than or equal to the distance along the path A-B-C). 100 ms N1 N3 Not always true in Internet 48 ms 48 ms N2

  32. Triangle inequality • The best indirect path usually has lower RTT than the direct path. But luckily only 5% pairs have a significant shorter indirect path.

  33. Euclidean Spaces • If geographic distance were the only factor in latency, a 2-D model would be sufficient. However, the fit is not perfect. Adding more dimensions, the accuracy of the fit improves slightly 3D is okay!

  34. Spherical coordinates • Does a spherical distance function provide a more accurate model, as the distances are drawn from paths along the surface of the Earth? No!

  35. 2D+Height • The Euclidean portion models a high-speed Internet core with latencies proportional to geographic distance. • The height models the time it takes packets to travel the access link from the node to the core. • The cause of the access link latency may be queuing delay, low bandwidth, etc. • A packet sent from one node to another must travel the source node’s height, then travel in the Euclidean space, then travel the destination node’s height.

  36. 2D+Height • Performs better than 2D and 3D! • Does not look very promising because they take the median!

  37. 2D+Height Nodes with large errors Height plots results smaller max error and median error

  38. Conclusion • Presents a simple, adaptive, decentralized algorithm for computing synthetic coordinates, which help Internet hosts to estimate latencies • Requires no fixed infrastructure.All nodes run the same algorithm. • Converges quickly by adaptive timestep. • Maintains accuracy even as a large number of new hosts join the network that are uncertain of their coordinates.

More Related