From: Kevin G. <kg...@nc...> - 2003-12-10 20:24:08
|
That is interesting! You are correct in that gettimeofday can be simulated with QueryPerformanceCounter() and QueryPerformanceFrequency() it just needs to get coded. Also it is not only used in the delay for UDP sending but in the jitter calculations for UDP traffic (the value is embedded in UDP packets), so it has to return values that are equivalent to the gettimeofday on *nix machines. Or the delay function could be rewritten not to use the gettimeofday function on Win32 builds but just use the QueryPerf* functions. Either way if you have some spare cycles and want to change either, feel free, we always gladly accept patches. Kevin On Tue, 9 Dec 2003, lilyco wrote: > Hi, Kevin, > > Thanks for your response. > > I made a little further investigation today and I found the reason is > that the UDP sending on Windows XP is blocked for too long a time such > that even though there is no inter-packet delay, the highest speed is > still only about 50Mbps. > > I dont understand the reason now and I failed to find any helpful > information on Google. > > Anyway, please let me know if you guys find out the problem in future. > By the way, I think the gettimeofday can be simply simulated by > QueryPerformanceCounter() and QueryPerformanceFrequency() APIs on > Windows. > > Thanks and regards, > Gu > > > Kevin Gibbs <kg...@nc...> wrote: > > >On Mon, 8 Dec 2003, lilyco wrote: > >> Hi, has anyone ever met such problem that, on Windows XP, the UDP > >> sending rate of Iperf is very slow? > >> > >> I have 2 machines connected by 1GigE link. Both have 2 2.4G Xeon CPU, > >> and one is running Linux, the other is running XP. When I test UDP > >> performance between these 2 machines, the throughput from Linux to XP is > >> very good, but the reverse direction can only reach about 50Mbps. The > >> TCP throughputs are both very well on two directions. > >> > >> Any ideas? > >> > >> Thanks a lot, > >> Gu > > > >You may be experiencing the lack of granularity of the > >GetSystemTimeAsFileTime on Win32 which is used for the replacement of > >gettimeofday which Win32 does not implement. This function has a large > >granularity 10ms, I believe, where gettimeofday on most *nixs will get you > >around a granularity of 10us. Unfortunately we have not had the time to > >rewrite the gettimeofday replacement for Win32 to use a Win32 Performance > >Timer rather than the GetSystemTimeAsFileTime function. > > > >Kevin > > > > > > __________________________________________________________________ > McAfee VirusScan Online from the Netscape Network. > Comprehensive protection for your entire computer. Get your free trial today! > http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 > > Get AOL Instant Messenger 5.1 free of charge. Download Now! > http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 > |