Advertisement

What is ping time?

Started by July 08, 2013 04:47 AM
10 comments, last by Khatharr 11 years, 4 months ago

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.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

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

enum Bool { True, False, FileNotFound };
Advertisement

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.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

This topic is closed to new replies.

Advertisement