Fping speedup
One of the users of Fping informed me of a strange problem. He is using Fping to ping a certain address very fast (once every 1 millisecond with a 1 millisecond timeout). It works as it should. But then he runs a program called 'XNote Stopwatch' and Fping speeds up.
"I stumbled across a strange behavior related to timing. Using the options shown above, I get less than 100 pings per sec. But if I have a program called "XNote Stopwatch" running at the same time as fping, then the ping rate from fping roughly triples. As soon as I shutdown the Stopwatch program, fping returns to the slower rate.
[...]
I get the "stopwatch effect" both with and without -i. I have repeated it on 2 different machines, both WinXP SP2. As soon as I launch the stopwatch program, fping speeds up. As soon as I exit the stopwatch program, fping slows back down. The stopwatch doesn't need to be running."
I'm dumbfounded by this. I am unable to reproduce this on my development machine (also WinXP SP2). But I see the same thing when pinging on my old Windows 2000 system.
I checked the Fping code and it does 2 things related to time:
a) Sleep x milliseconds between pings
b) Query the high performance counter when sending an echo request, and again when receiving the reply to calculate the round trip time.
I'm not sure how the stopwatch program can influence Fping. My guess is they are doing some tricks to get a high precision timing. But this can only influence the high performance counter, if even that. This would result in strange round trip times, not in speeding up. It's hard to believe that they can influence the sleep of another application. I contacted dnSoft (the creators of the stopwatch program) to see how I can solve this.
"I stumbled across a strange behavior related to timing. Using the options shown above, I get less than 100 pings per sec. But if I have a program called "XNote Stopwatch" running at the same time as fping, then the ping rate from fping roughly triples. As soon as I shutdown the Stopwatch program, fping returns to the slower rate.
[...]
I get the "stopwatch effect" both with and without -i. I have repeated it on 2 different machines, both WinXP SP2. As soon as I launch the stopwatch program, fping speeds up. As soon as I exit the stopwatch program, fping slows back down. The stopwatch doesn't need to be running."
I'm dumbfounded by this. I am unable to reproduce this on my development machine (also WinXP SP2). But I see the same thing when pinging on my old Windows 2000 system.
I checked the Fping code and it does 2 things related to time:
a) Sleep x milliseconds between pings
b) Query the high performance counter when sending an echo request, and again when receiving the reply to calculate the round trip time.
I'm not sure how the stopwatch program can influence Fping. My guess is they are doing some tricks to get a high precision timing. But this can only influence the high performance counter, if even that. This would result in strange round trip times, not in speeding up. It's hard to believe that they can influence the sleep of another application. I contacted dnSoft (the creators of the stopwatch program) to see how I can solve this.

0 Comments:
Post a Comment
<< Home