CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2009
    Posts
    6

    Speed issue with UDP data on XP SP2 vs XP SP3

    Hello,

    I have a multicast file transfer program which seems to be having some issues with speed on particular versions of Windows.

    I had a user of the software email me saying he was unable to get efficient file transfer speeds when running the sender under Vista SP2 or XP SP3, but good speeds on XP SP1 as well as Linux. I ran a test on my end between two boxes, one running XP SP2 and the other running XP SP3, connected via 100Mbps Ethernet. With the SP2 box as the sender, configured with no delay between sends, I'm able to run at about 90% line speed. The average time between sends is about .120 ms (optimal being .111 ms), and a Wireshark trace indicates this to be pretty consistent. When I switch it around so the SP3 box is the sender, again with no delay between packets, it only runs at about 53% line speed. In this case we're looking at around .210 ms between sends, again with Wireshark showing it to be consistent.

    So the question here is what in SP3 could be causing this slowdown? I took a peek at the SP3 Overview documents and nothing's jumping out at me. All the network code is Berkley sockets, as it need to compile on multiple OS's.

    The source and Windows EXEs can be found at http://www.tcnj.edu/~bush/uftp.html.

    Thanks,
    Dennis
    Last edited by Clairvoyant1332; July 5th, 2009 at 08:30 PM.

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Speed issue with UDP data on XP SP2 vs XP SP3

    Windows Firewall or AV/apps?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jul 2009
    Posts
    6

    Re: Speed issue with UDP data on XP SP2 vs XP SP3

    Windows firewall is off on both sides, and VirusScan on/off on either side doesn't make a difference.

  4. #4
    Join Date
    Jul 2009
    Posts
    6

    Re: Speed issue with UDP data on XP SP2 vs XP SP3

    I reproduced this issue with some shortened sample programs, which are attached (the transmitter takes an IP and port as the first two args). As before, SP2 -> SP3 ran close to the full 100Mbps, while SP3 -> SP2 ran 55%-60% at best.
    Attached Files Attached Files

  5. #5
    Join Date
    Nov 2002
    Location
    California
    Posts
    4,556

    Re: Speed issue with UDP data on XP SP2 vs XP SP3

    Try re-running your tests with different sizes for your message. The size of the message is now hard-coded at 1400. Try to re-run at the following message sizes:
    1023
    1024
    1025
    1026

    If you see a large change from 1024 to 1025, then you are dealing with a known issue involving registry entries respectively called FastSendDatagramThreshold and FastCopyReceiveThreshold. The issue affects only Windows machines (naturally, since it's a registry entry) and not Linux etc. See, for example, these two links

    "Udp sending performance in Gbit Ethernet" at http://groups.google.com/group/micro...4b485cc26bbdf2

    "UDP Send Performance in GigE network with WinSock" at http://www.kolumbus.fi/juha.lemmetti/Udp.html


    Mike
    Last edited by MikeAThon; July 18th, 2009 at 12:26 PM.

  6. #6
    Join Date
    Jul 2009
    Posts
    6

    Re: Speed issue with UDP data on XP SP2 vs XP SP3

    I ran with different message sizes, and found that 1024 bytes packets did indeed move faster than 1025 bytes packets on the SP3 box. I tried setting FastSendDatagramThreshold to 1500, but it didn't have any effect. Rebooting didn't help either. This parameter also has no effect on the SP2 box. Setting it to 1024 doesn't slow it down.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured