Windows 7 / Networking

What Causes Latency, How to Measure It, and How to Control It

Latency typically originates from two different sources: routers and distance. Each router that a packet travels through has to copy the packet from one network interface to the next. This introduces a very slight delay-typically only a few milliseconds. However, traffic on the Internet might have to travel through more than fifty routers when making a round trip between two computers, so the delays do add up. Busy routers and networks that are near saturation can introduce more latency because the router might have to wait several milliseconds before it can place a packet onto a network interface.

Distance also introduces latency. Packets travel across networks at a speed slightly slower than the speed of light. A rough estimate of the speed packets travel would be about 100,000 miles per second. Although the speed is still very fast, a packet that has to travel to the other side of the Earth and back would have at least 250 ms of latency (before you calculate latency introduced by routers). Satellite connections add about 500 ms of latency sending the packet to and from the satellite. In addition, network paths are often very indirect, and packets often travel several times farther than the distance of a straight line between two computers. VPNs, in particular, can cause extremely indirect routing between computers.

The most common tool to measure latency is the command-line tool Ping. Ping can give you a rough idea of the latency between two points, but it is less than perfect because Ping does not transmit TCP-based data. Instead, Ping sends Internet Control Message Protocol (ICMP) messages that are designed for diagnostic purposes. Many routers give these ICMP messages a lower priority than other traffic, so Ping may report a higher latency than normal. In addition, many routers and computers are configured to completely block the ICMP messages used by Ping. A related command-line tool, PathPing, provides approximate latency information for all routers between two hosts. PathPing uses the same ICMP messages as Ping.

If latency is causing a problem on your network, first determine the source of the latency. If distance is causing the latency, find ways to shorten the distance. For example, you might replace a satellite link with a terrestrial link. Alternatively, if you determine that the path being taken between two points is inefficient, you might be able to reconfigure your network to shorten the distance that the packets need to travel between the two points. If you determine that busy networks or routers are introducing latency, you can upgrade your routers or increase the available bandwidth. Alternatively, you can use Policy-based QoS to prioritize the most important traffic to reduce latency for time-sensitive transmissions, such as streaming media and VOIP.

[Previous] [Contents] [Next]

In this tutorial:

  1. Configuring Windows Networking
  2. Usability Improvements
  3. Network And Sharing Center
  4. Network Explorer
  5. How Windows Finds Network Resources
  6. How Windows Publishes Network Resources
  7. How Windows Creates the Network Map
  8. Network Map
  9. Set Up A Connection Or Network Wizard
  10. Manageability Improvements
  11. Network Location Types
  12. Policy-Based QoS
  13. Selecting DSCP Values
  14. Planning Traffic Throttling
  15. Configuring QoS Policies
  16. Configuring System-Wide QoS Settings
  17. Configuring Advanced QoS Settings
  18. Testing QoS
  19. Windows Firewall and IPsec
  20. Windows Connect Now in Windows 7
  21. Core Networking Improvements
  22. Networking BranchCache
  23. How Hosted Cache Works
  24. How Distributed Cache Works
  25. Configuring BranchCache
  26. BranchCache Protocols
  27. File Sharing Using SMB
  28. Web Browsing with HTTP (Including HTTPS)
  29. DNSsec
  30. GreenIT
  31. Efficient Networking
  32. What Causes Latency, How to Measure It, and How to Control It
  33. TCP Receive Window Scaling
  34. Scalable Networking
  35. Improved Reliability
  36. IPv6 Support
  37. 802.1X Network Authentication
  38. Server Message Block (SMB) 2.0
  39. Strong Host Model
  40. Wireless Networking
  41. Improved APIs
  42. Network Awareness
  43. Improved Peer Networking
  44. Services Used by Peer-to-Peer Networking
  45. Managing Peer-to-Peer Networking
  46. Peer-to-Peer Name Resolution
  47. EAP Host Architecture
  48. Layered Service Provider (LSP)
  49. Windows Sockets Direct Path for System Area Networks
  50. How to Configure Wireless Settings
  51. Configuring Wireless Settings Manually
  52. Using Group Policy to Configure Wireless Settings
  53. How to Configure TCP/IP
  54. DHCP
  55. Configuring IP Addresses Manually
  56. Command Line and Scripts
  57. How to Connect to AD DS Domains
  58. How to Connect to a Domain When 802.1X Authentication Is Not Enabled
  59. How to Connect to a Domain When 802.1X Authentication Is Enabled