Sign in to follow this  
Peter Lake

What is ping time?

Recommended Posts

Peter Lake    104

I know this is a silly question, but I can't for the life of me find a clear sentence on the internet that says "ping is the time it takes to ..." so I have to ask here: Is ping the time it takes to send data from client to server, or client to server and back to client? I'm pretty sure it's the latter, but if my game tells you that your ping is half or double what it really is, that's a big problem. I want to be safe.

Share this post


Link to post
Share on other sites
Dragonsoulj    3212

 

If you are running Windows, open the command prompt, type "ping google.com" and read what it outputs.

And if you're running Linux or some flavour of UNIX (including OSX), do the same tongue.png.

 

Yeah, I didn't have Linux up to test it.



but I can't for the life of me find a clear sentence on the internet that says "ping is the time it takes to ..."


From Wikipedia:

"In the process it measures the time from transmission to reception (round-trip time)[1] and records any packet loss."

Share this post


Link to post
Share on other sites
hplus0603    11347

If I remember correctly, in IRC a ping response is called a pong.

 

In Erlang, a ping request to an existing node will return 'pong'. A ping request to a node that is down instead returns 'pang'. (Which is funny because you usually feel a pang when you realize something's missing :-)

Share this post


Link to post
Share on other sites

It should be noted that in it's "kind of official" meaning, ping refers to ICMP ping, not something you send as normal data. Technically, this is just an IP datagram which uses a different internet layer protocol (instead of e.g. TCP or UDP).

 

Practically, this matters because not few cheap hosters will cheat and give ICMP (and in particular ping) higher priorities in their routers. Which means that the machines appear to have a better reachability than they have in reality. So you might wonder why it takes forever for your server to reply, but when you type ping yourserver into a command prompt, everything looks just fine. Thus, since it is "obviously" not the network, you waste hours trying to figure what's wrong on your server. Bah.

 

And with that lesson learned, you'll always implement your own ping or stay away from cheap hosters smile.png

Edited by samoth

Share this post


Link to post
Share on other sites
Bacterius    13165

It should be noted that in it's "kind of official" meaning, ping refers to ICMP ping, not something you send as normal data. Technically, this is just an IP datagram which uses a different internet layer protocol (instead of e.g. TCP or UDP).

 

Practically, this matters because not few cheap hosters will cheat and give ICMP (and in particular ping) higher priorities in their routers. Which means that the machines appear to have a better reachability than they have in reality. So you might wonder why it takes forever for your server to reply, but when you type ping yourserver into a command prompt, everything looks just fine. Thus, since it is "obviously" not the network, you waste hours trying to figure what's wrong on your server. Bah.

 

And with that lesson learned, you'll always implement your own ping or stay away from cheap hosters smile.png

 

There's also shady "low ping" services which claim to give you better latency by going through their network (with numbers occasionally contradicting the laws of physics) when in reality they are just intercepting ping packets (either ICMP or in whatever format the ping packet is for X or Y application) and forging a fake reply.

Share this post


Link to post
Share on other sites
hplus0603    11347

ping refers to ICMP ping

 

"ping" is actually the name of the utility that generates ICMP protocol ECHO packets (PDUs) and measures packet loss and round-trip time to some given target. There's no such thing as a "pick packet" except, perhaps, to name "packets created by the ping utility."

Thus, in turn, "ping time" is the time value reported by the "ping utility." Which happens to be round-trip time.

 

In games, the low-level echo time is only half the story, though, because it doesn't account for queuing and processing times in the client and server. In a game, the time that really matters is time from giving a command, through the client processing and sending that command, through the server receiving and processing that command and sending a reply, through the client receiving and processing that reply. Things like OS scheduling jitter or graphics frame rate can affect this game-level round-trip time, and because that's the time that matters, that's often the time displayed by particular games as "ping time" even though they don't use the particular command-line tool called "ping."

Share this post


Link to post
Share on other sites
Khatharr    8812

I actually ran across a proxy system once that allowed a user to tunnel HTTP over ICMP using echo packet data. It was hilarious at the time because I had one of those crappy 'ClearWire' wimax modems and their system allowed ICMP traffic to pass through without requiring a login.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this