Ping display changes in today's update
Today’s patch includes some changes to the various tools that display latency information. All the different readouts now measure roundtrip network transmission time (“ping”). This means that they should all agree with one another and with a standard ICMP ping (the value you get when you do a “ping” command from an OS command prompt). We made this change to reduce confusion and make our ping value match the standard definition used by other tools and games.
For those interested in technical details, here is how this change affects each of the different readouts:
The ping times on the region select dialog were already displaying network latency, and so those numbers are unchanged. Please note that a few weeks ago we released a patch that changed this display when you are in a party. Instead of displaying your own ping to the region, it will display the worst ping to the region from among all party members, along with the avatar of the party member whose ping was used. You can hover over the region to see the ping times of all party members.
The ping time in the top-right corner of the HUD, enabled by the “display network information” checkbox or the dota_hud_netgraph convar, previously measured something I am calling, for lack of a better term, “command latency”. This is why it didn’t match up with the region select ping or ICMP ping times. For a full explanation of exactly what “command latency” is, we need a quick reminder of how client-server video games like Dota 2 work.
The Dota 2 server “ticks” at 30hz. This means 30 times a second, the server checks for incoming network packets, runs the simulation to advance the state of the world, and then sends out packets with updates. Clients work in a similar way, but of course clients have the additional task of rendering the screen, and clients each run at a different frame rate. Here’s what has to happen when you issue a command:
1.) Keyboard or mouse input event occurs while the client is busy processing a frame.
2.) Client finishes that frame.
3.) Client interprets the input event and sends a command packet to the server.
4.) Command packet goes through the Internet and arrives at the server.
5.) Server waits until it’s time for the next tick.
6.) Server reads all the packets that have arrived.
7.) Server executes the incoming commands and simulates the game, advancing the state of the world.
8.) Server sends out a packet that describes changes to the game state as a result of running the simulation.
9.) State packet goes through the Internet and arrives at the client.
10.) Client finishes the frame it was busy rendering.
11.) Client processes the incoming packet.
12.) Client updates its version of the world.
13.) Client starts rendering the next frame.
(Here we actually are actually glossing over a few details, like the fact that a server update might require multiple state packets, and the interpolation the client does when its frame rate is higher than 30hz.)
The number previously displayed by the in-game HUD ping display (“command latency”) was a measurement of items 4—11. With today’s patch, it will display network roundtrip transmission time, meaning only items #4 and #9 are counted. Although command latency does capture more elements that contribute to how responsive the game feels, this isn’t a good model for a few reasons. First, most users were using this number as a measure of network connection quality to evaluate and understand connectivity to different regions. Including those additional sources of latency, some of which depend on the client, makes it unreliable for that purpose. Second, it brings our definition of “ping” in line with the standard definition used in network engineering and other games. For example, it should now match the number that is displayed by your Operating System’s “ping” command that uses ICMP packets. Finally, having several different metrics, all called “ping” but having different values, led to confusion and distrust that the values were being measured accurately. (That distrust seems quite warranted to us, given the crazy output of the “-ping” chat command -- see below.) Many players assumed that the in-game number was correct, and that automatic region selection was making decisions based on inaccurate information.
The “-ping” chat command displays yet another value. It sends a message to the server, and the server replies with a ping time as measured on the server. However, the number it was previously sending back was actually a very inaccurate estimate. The server was taking the server-side equivalent of the command latency and subtracting off the extra latencies, in an attempt to approximate the network latency. However, for some of the items subtracted off, the server was using a crude estimate, so the overall estimate for the network latency was very poor quality. It was adequate for its original purpose, but was never intended as an accurate diagnostic measurement. After this patch, the value printed by the -ping command will measure round-trip network latency, like the other commands, so it should generally match the other ping times closely, although there may be some slight discrepancy since it is measured by the server. Essentially the technical changes we have made in this patch are to adjust the packet code and headers so that we have accurate measurements of the extra sources of latency listed above, so that we can subtract them off accurately, yielding the correct network ping time.
Finally, there is the full netgraph tool, accessible through the Source2 vconsole tool. This tool previously displayed the command latency only, the same as the in-game HUD. Now, it breaks down the sources of latency into "peer" "net", and "local". The "peer" number accounts for items 5--8, "net" is the ping time, and "local" measures for items 10 and 11. If you add peer latency, net latency, and local latency together, you get the command latency. If you feel a spike of sluggishness in game, but the ping time doesn't change, this probably means that there isn't a network issue, but instead something is causing the frame rate on the server or client to spike. The local and peer latency numbers (and your FPS readout) can help narrow it down.
Today we also made a configuration change to our game server firewall rules to allow ICMP echo request, which is the packet used by the standard OS ping tool.
One last note: the standard definition of “ping” is roundtrip latency, not one-way. If you are used to one-way latency measurements, divide the roundtrip ping time by 2 get the equivalent one-way latency.
Hopefully by changing all these different ping displays to match up with one another and display the industry-standard metric, we can reduce confusion and make it easier to accurately diagnose network and frame rate issues.
Awesome technical explanation. Thanks for sharing
This was really needed. I didn't understand why the Server select screen showed 33 ping, the in game counter you can select in the options menu showed 66 ping and every time I used the -ping command it showed 5ms, to the same server. I used to have -33 ping in source 1 so I knew the server select screen was right but it was really confusing.
Originally Posted by stazima
Whats command for full net graph tool?
i using 9mb line , hope SE ASIA become nomal dota2 20-50+ms , dont same reborn 100+ms ... anyway THANKS U ^^
I'm amazed on how well of a job you guys did with the look of the main menu of Dota 2. I absolutely love it.
Last edited by robert_hehn; 11-12-2015 at 09:40 PM.
I think it's "status" in console to get the pings of all the players, atleast that's what i think he meant.
Originally Posted by festEdgar
net_graph 1 ?
Originally Posted by festEdgar
Sorry for being blunt, but how the frack removing net_graph from in-game into an external tool that pops up two extra windows is "make it easier to accurately diagnose network and frame rate issues"? Isn't it the other way around, everything you did until now was to hide info and confuse people in a cheap way to mask server issues?
Originally Posted by fletcher
And, am I just fooling myself, or is this backed up by a major fixing of most of the servers? It's been two years since I've seen under 60ms (REAL ping) on EU West, time while my ISP and it's peering partners improved even more, and confirmed in any other online game besides Dota 2.
Funny how important info like this one is not mentioned in the official post. Here's how:
Originally Posted by festEdgar
- add launch option: -vconsole
- open console and enter: consoletool netgraph
If you don't have a multi-monitor setup, it's rather useless, unlike the old net_graph that was available on demand/at all times, on the game screen.
Nice attempts guys, but it's about the one in my avatar.
guys when well be the community be part of reborn i am keep of waiting on community so i can update my guild give me some information if u guys have details more power !!