Different OS's Different Pings

Started by davej99, Dec 26, 2010, 11:48:39

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

sof2er

Get thinkbroadband.com Broadband Quality Monitor and we'll see who's right and who's wrong. (Assuming you're with IDNet you should have a static IP and hopefully your router allows for ICMP pinging)

Rik

Rik
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.

davej99

There seems to be an argument that XP has some advantages in terms of ping and gaming latency. This paper seems to suggest the new Vista networking stack slows things down versus XP. So maybe the differences Rik and I have noticed have some basis.

esh

Just blatting out a ping from two different OS doesn't really tie it to the OS specifically. It may be the *driver* or what features are enabled on the card (eg. checksum offloading) or what MTU is set and so on, though it is generally accepted the Vista networking stack features some oddities that were ironed out for Win7. It also depends on what ping is telling you. Ideally you would have the same revision of the driver on both OS with some code written (or acquired) which can be compiled on both operating systems and run for a direct comparison. The version of 'ping' on the operating systems may be different.

Basically there's an awful lot of hunting to be done, but if you want a deeper hand on looking through this I can probably guide you a bit.
CompuServe 28.8k/33.6k 1994-1998, BT 56k 1998-2001, NTL Cable 512k 2001-2004, 2x F2S 1M 2004-2008, IDNet 8M 2008 - LLU 11M 2011

Steve

I was going to suggest that if you multiply the XP result by 2 you will arrive at the correct answer. :whistle:
Steve
------------
This post reflects my own views, opinions and experience, not those of IDNet.

davej99

Quote from: esh on Dec 26, 2010, 22:11:36Basically there's an awful lot of hunting to be done, but if you want a deeper hand on looking through this I can probably guide you a bit.
Thanks, Esh, for your insight. I am not a gamer, nor is Rik I think. We just made the observation that XP pings lower than Vista, than the routers OS (Linux?) and LinuxMint. XP comes out about 20ms better. Now that is significant to gamers if it is true, so I thought it worth raising, but mostly because I was curious. The other point I have in mind is that if pings can be impacted by 20ms as a result of system configuration, that should be addressed before escalating latency issues to the ISP.

If you want to improve our understanding of this phenomenon, Esh, that would only be helpfull to our fellow members, not least if systems could be optimised to reduce pings by 20ms. But please do not go out of your way on my account.

Thanks again, Dave.


esh

I am pretty certain I do not see factors of two between XP and Win7. I don't have a Vista box for a direct comparison. Using my network statistics collected over 2+ years I see that Windows is marginally slower (0.3-1.0ms vs. 0.1ms) to respond than the Linux systems (this is done every 5 minutes with the results recorded) but this could just be due to the network layout; the Windows systems are one further hop away. I believe the newer Windows TCP/IP stack is yanked straight out of *BSD so it was definitely improved vastly beyond the Win95/98 stage. My router is a BSD variant which shows an average of 8ms to the IDNet gateway (these are again, automatically gathered and recorded over 4 hour periods). If I ping from my Win7 box (which is another router and switch away from the main router) I get


ping google.com

Pinging google.com [173.194.37.104] with 32 bytes of data:
Reply from 173.194.37.104: bytes=32 time=8ms TTL=58
Reply from 173.194.37.104: bytes=32 time=9ms TTL=57
Reply from 173.194.37.104: bytes=32 time=8ms TTL=57
Reply from 173.194.37.104: bytes=32 time=10ms TTL=58

Ping statistics for 173.194.37.104:
   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
   Minimum = 8ms, Maximum = 10ms, Average = 8ms

So that matches with my router just fine.

Most importantly of course is that 'ping' is a general measure of your network point-to-point latency but isn't really a very good measure of a latency in a game in its default state. Why? Because by default the ICMP packet is tiny. Now let's try this


ping -l 1400 google.com

Pinging google.com [173.194.37.104] with 1400 bytes of data:
Reply from 173.194.37.104: bytes=64 (sent 1400) time=23ms TTL=57
Reply from 173.194.37.104: bytes=64 (sent 1400) time=24ms TTL=58
Reply from 173.194.37.104: bytes=64 (sent 1400) time=23ms TTL=57
Reply from 173.194.37.104: bytes=64 (sent 1400) time=23ms TTL=57

Ping statistics for 173.194.37.104:
   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
   Minimum = 23ms, Maximum = 24ms, Average = 23ms


So a 1368 byte increase has nearly trebled the observed latency. Some busy games need thousands of bytes over several packets to adequately transmit a 'snapshot' (current game state), plus combined with a game server being in Europe, pings of 100-200ms even on a modern, good-quality broadband connection is not unlikely. A *very* important thing to note here is that the default on Windows is a 32 byte packet, whereas with Linux this will be 56 bytes (+8 bytes header), so on even ground the Linux ping will likely be higher due to this factor alone. Use "-l" on Windows (that's an L) to change the packet size, and "-s" on Linux.

I would check you are using latest drivers on Vista. Then go into Device Manager (in Control Panel->System) and examine the advanced section of your network adapter. Here you'll find things like "Flow Control" (can definitely slow things down) to "Checksum Offload" (will decrease the load on the network adapter), "Jumbo frames" (should be irrelevant for this...), and "Interrupt moderation" you may want to play with (enabled gives lower interrupt polls and should be higher efficiency, disabled is a higher load but may be lower latency). You can also play with your receive buffers here, but for small pings that should be irrelevant again. On Linux, "ethtool" is generally used for prodding your network adapter advanced settings, though it's not as friendly as the Windows device manager.

I can try and dig up some C code to compile an independent ping tool later, I don't know if you're interested in that. The theory being, you have the exact same tool pinging on both systems then. I'm a little busy right now, but I'll try and keep up with this thread.
CompuServe 28.8k/33.6k 1994-1998, BT 56k 1998-2001, NTL Cable 512k 2001-2004, 2x F2S 1M 2004-2008, IDNet 8M 2008 - LLU 11M 2011

Steve

Surely what is significant is the pings from the router web interface which in both cases i.e Vista and XP were identical at some 40 odd msec.
Steve
------------
This post reflects my own views, opinions and experience, not those of IDNet.

davej99

#33
Quote from: esh on Dec 27, 2010, 11:27:57
I am pretty certain I do not see factors of two between XP and Win7. I don't have a Vista box for a direct comparison. Using my network statistics collected over 2+ years I see that Windows is marginally slower (0.3-1.0ms vs. 0.1ms) to respond than the Linux systems. ....... I would check you are using latest drivers on Vista. Then go into Device Manager (in Control Panel->System) and examine the advanced section of your network adapter. Here you'll find things like "Flow Control" (can definitely slow things down)  ......
Thanks, Esh. Plenty to think about there. The ping difference is 20ms. This probably does not extrapolate to a factor 2. I do not see much difference between Vista and LinixMint on same system. All drivers are latest with default settings. I will go in and take a closer look as you suggest. Your results are much more systematic, so mine may be anomalous and as you say not really meaningful for gaming, which I do not understand. However, the simple ping is constantly talked about by gamers. Will vary packet size and see what happens. C ping tool sound like a great idea. If you find time to write it, I will certainly run it. I can see that being a useful tool to others too so we can meaningfully compare pings around the IDNET network and to various sites.

Quote from: Steve on Dec 27, 2010, 11:55:29
Surely what is significant is the pings from the router web interface which in both cases i.e Vista and XP were identical at some 40 odd msec.
Thx, Steve. Is it true to say the router GUI ping is generated by a router OS command and therefore is independent of the client OS?

As another test just for fun, I have dug out a 12 year old laptop running ME and I get 27ms min 42ms max 39ms avg. Not sure Vista has moved very far?

Anyway, folks, thanks for all your time and expertise on this one. It has provided much needed stimulation and some CPU heat whilst I was waiting for our central heating to thaw out. Cheers, Dave

esh

Quote from: davej99 on Dec 27, 2010, 12:42:50
Thx, Steve. Is it true to say the router GUI ping is generated by a router OS command and therefore is independent of the client OS?
...
As another test just for fun, I have dug out a 12 year old laptop running ME and I get 27ms min 42ms max 39ms avg. Not sure Vista has moved very far?

Firstly, yes. The router will almost certainly run the Busybox ping tool.

I notice you're getting quite a range of pings there. What's your sampling statistic (how many repeats)? It might be better pinging something with a bit more stable results. For google etc I have a range of 3ms or so. You've got a 19ms range there which can pretty much account for the 20-40 difference alone if you play with statistics.

200 page document due in two days, thank god for computers, I wouldn't want to typewriter this...
CompuServe 28.8k/33.6k 1994-1998, BT 56k 1998-2001, NTL Cable 512k 2001-2004, 2x F2S 1M 2004-2008, IDNet 8M 2008 - LLU 11M 2011

davej99

Quote from: esh on Dec 29, 2010, 00:43:08
I notice you're getting quite a range of pings there. What's your sampling statistic (how many repeats)? It might be better pinging something with a bit more stable results. For google etc I have a range of 3ms or so. You've got a 19ms range there which can pretty much account for the 20-40 difference alone if you play with statistics.
Thanks, esh. You are right to question the statistics because I have not explained things well and and the methodology is piecemeal and not at all rigorous.

The original XP vs Vista comparison of 20ms vs 42ms was an eyeball comparison of the baseline or floor level ping over several hundred measurements taken and plotted using PingGraph. I chose this method because it eliminates statistical variation caused by the network such as packet prioritisation or congestion. It is sensitive enough to detect the difference between a cable and a wireless connection and I suggest best compares systems.

The trace route comparison I posted shows a similar difference and tends to confirm the original observation and eliminate routing differences. The trace routes also provide a crude benchmark for Linux vs XP on the same system, and no more, but do suggest XP is better. The final ping results I posted for ME are a sample of about 50. Curiously the pattern here looks like a floor level of around 42ms with some dropout into the 20s. This needs further investigation, because I am not certain it is meaningful, and my conclusion is certainly superficial.

But overall, the most reliable comparison, that of XP vs Vista baselines, seems to indicates a systemic difference of 22ms, not caused by random network variation. However, this work is not at all thorough and badly needs more expert hands to reach a safe conclusion. Regards, Dave.

Note for Admin: Might be better to move this thread to the Networking section.

Rik

Rik
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.

esh

Obviously in terms of 100Mbit networks, 20ms is positively gigantic. You can shift 2Mbit in 20ms, in theory! Assuming this difference is real for a moment, I still keep coming back to the ideal of polling vs interrupts, though I am still at a loss to consider why even this would add such a delay. Definitely get the device information and settings in the XP machine. There is the possibility of something wonky going on with the OS timing of course. You could disable all the power saving/CPU frequency scaling features in the BIOS, but again, that seems fairly wild.

If you wanted to be really obtuse, you could add a second network card to the Vista system, then route the XP network through the Vista PC to the router and then see what the ping result was ;) pingtest.net might also be another interesting independent test.
CompuServe 28.8k/33.6k 1994-1998, BT 56k 1998-2001, NTL Cable 512k 2001-2004, 2x F2S 1M 2004-2008, IDNet 8M 2008 - LLU 11M 2011