Developer Geeks Home

How to Determine Network Latency using Ping Test

RSS
 

  • Posted 3 years ago
  • Category: Webservices, network latency
  • Audiences: Developer, Project Manager, Quality Assurance, Web Developer,

During development of Web services and its Clients we don’t think much about network issues which can occur at the production site. One problem which is faced mostly is Network Latency issue. This article explains you how to determins Network latency using Ping test.

How to Determine Network Latency Using Ping Test

During development of Web services and its Clients we don't think much about network issues which can occur at the production site.

Network Latency

'Network Latency' is one such issue which needs to be carefully monitored during testing phase of any project.

'Network Latency' is simply defined as the time delay observed as data transmits from one point to another. In some cases, network latency may be defined by the time it takes some form of data to make a full circuit back to the originating point - round trip time.

Assumption in network latency is that the time of transmission between the origin and destination should be instantaneous. Of course, there will always be some delay. Even transmission at the speed of light is not instantaneous and can be measured with very precise instruments. Therefore, data on network latency should always be available. In some cases, there may not be a delay the user can notice.

Factors that contribute to network latency

  • Transmission delays: Transmission refers to the medium used to transmit the information. This may be a phone line, fiber optic line or wireless connection, just to name a few examples. Each will contribute to the delay in some way. Some may be faster mediums than other. To help reduce network latency, it may be possible to change the medium to a faster type. 
  • Propagation delays: Propagation is one of the harder things to control in network latency. Simply put, this is the physical distance between the origin and destination. Naturally, the greater the distance, the more delayed the transmission will be. However, this does not usually cause a significant delay. 
  • Routers and computer hardware delays: The other contributors to network latency, routers and computer hardware, may be able to be changed. In those cases, upgrading this hardware can help process information faster, thus speeding up the process. While this may involve a substantial investment, the benefits may be worth the investment; depending on how much and how often data is transferred

Following Tests help in determining the Latency over the network:

PING Test

ping (Packet InterNet Groper) is a utility used to verify if a network data packet is capable of being distributed to an address without errors. The ping utility is commonly used to check for network errors.

How PING works?

  • User would first start by using the ping command to ping the IP address XXX.XXX.XXX.XXX
  • Next the request is sent over the network hub and router in this basic example to the other computer with this IP address.
  • Once successfully received the computer replies to the ping with a pong response and once received, the time between when sent and when received is calculated to generate an average response or latency time.
  • If the ping does not reach its destination, it is either due to a network configuration error or because it is being blocked the sending computer encounters a request timed out error.

Identifying Latency

Consider that you want to test network latency to m/c XXX.XXX.XXX.XXX.

Run below command from windows command prompt.

ping XXX.XXX.XXX.XXX

Response of this appears something like shown below.

Reply from XXX.XXX.XXX.XXX: bytes=32 time=157ms TTL=62

Reply from XXX.XXX.XXX.XXX: bytes=32 time=152ms TTL=62

Reply from XXX.XXX.XXX.XXX: bytes=32 time=160ms TTL=62

Reply from XXX.XXX.XXX.XXX: bytes=32 time=157ms TTL=62

Ping statistics for XXX.XXX.XXX.XXX:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 152ms, Maximum = 160ms, Average = 156ms

Check the 'Average' round trip time- this shows how much time ping utility took to get a response from the destination address.

 The results of a ping test vary depending on the quality of the Internet / network connection.

  • A good broadband Internet connection (wired or wireless) typically results in ping test latency of less than 100 ms, often less than 30 ms. A satellite Internet connection normally suffers from latency above 500 ms.
  • In this case 'Average' round trip time is 156ms on a broadband internet connection, as per above theory it shows a latency of 56ms.

References

comments powered by Developer Geeks

My Recent Articles [2]

  • How to Determine Network Latency using Ping Test
  • During development of Web services and its Clients we don’t think much about network issues which can occur at the production site. One problem which is faced mostly is Network Latency issue. This article explains you how to determins Network latency using Ping test.

  • How to implement Oracle UDT in ODP.NET
  • This article is a beginner example on how to implement a basic Oracle UDT in .NET. It basically covers 3 important steps that needs to be kept in mind while implementing a .NET Custom type for an Oracle UDT. Provided sample code is very simple and easy to understand.