locked
Can't get maximum throughput RRS feed

  • Question

  • Dear all,

    I am writing my work socket to send a large chunk of data (10mb) over port 6000 on a wireless lan (54M Wireless-G).

    However, I find that I can only utilize approximately 20~25% of the bandwidth compare to when I drag and drop the file using windows explorer.

    May I know if this is because Win7 / Vista cap the max bandwidth utilization for 1 application?

    Thanks is advance.

    Tuesday, May 11, 2010 10:55 PM

All replies

  • Windows Explorer (actually the Windows network file redirector) is optimized for doing these kinds of transfers, especially in Vista and up.  You haven't described your code, but for whatever reason it is probably just not written as optimally as how the Windows system does it.  The suboptimal code could be in the server, client, or both.

    > when I drag and drop the file

    If you are trying to send a file to the Socket, you might want to look into the Socket.SendFile method.  This is specially designed for this scenario and might give you a boost.

     

    Tuesday, May 11, 2010 11:32 PM
  • Binary,

    I am using a file for testing now, but the end product will have it source from a hardware device. So SendFile method doesn't help in this case.

    I do not think this is optimization issue. I look at the graph at Task Manager, and saw that my bandwidth utilization is cap at approximately 20~25% of what Windows Explorer can achieve.

    And it is a straightline.

    If there is some in-efficiency or bug, or whatevey issue, we shouldn't see the transmission rate is a straight line. Certainly something is limiting it.

    I checked further, there is this QoS is Winsocket, can someone confirm if this will cause any issue?

    http://msdn.microsoft.com/en-us/magazine/cc301862.aspx

     

     

    Wednesday, May 12, 2010 10:03 AM
  • And it is a straightline.

    If there is some in-efficiency or bug, or whatevey issue, we shouldn't see the transmission rate is a straight line. Certainly something is limiting it.

    Not necessarily, inefficient code running at its max. capacity will show a straight line too. So how are you sending? Which protocol are you using? How are you receiving?

    To my knowledge, there's no capping of bandwidth in any Windows version.

    Cristian.

    Wednesday, May 12, 2010 2:06 PM
  • My code is very simple, read from file, and then send.

    I can send at almost MAX speed when using a Gagibit lan on the same computer. So there is nothing wrong / inefficient on my code.

    I am using my own protocol, sending at TCP port 7890 (or any other port), at 1400 (I have tried many other values but with little difference. Certainly if I use a buffer size of 10 byte for example, the performance will be very slow) bytes everytime (slightly below the MTU), other than the setup there is no handshake between the client / host (since TCP guarantee delivery)

    Some how, some body might have capped my bandwidth on the Wireless lan.

    Wednesday, May 12, 2010 11:29 PM
  • > I can send at almost MAX speed when using a Gagibit lan on the same computer. So there is nothing wrong / inefficient on my code.

    This is good to know.  However, I will point out that it does not completely rule out an implementation issue.  For example, if your implementation is "chatty" (waits for responses after it sends), it will perform better a lot better on a lower latency LAN than a higher latency WAN.

     

    Wednesday, May 12, 2010 11:37 PM
  • Simply when I send a file using SendFile method I will also utilize 20 to 25% . When I do the same using Windows Explorer I have the speed.

    The 802.11 protocol for Wireless has a Max throughput of 2 Mbps. So it will never utilize more then 20 to 25% in your network monitor.

    Hopefully this will explain why it sends at max 25%.

    Wednesday, May 12, 2010 11:47 PM
  • That might make sense if the wireless interface got classified as Link Speed 10 Mbps.  The impression that I got is that the original poster was able to use Windows Explorer to transfer over this same interface at a much higher utilization.

    Chui, can you report back:

    In the Task Manager (taskmgr) Networking tab, what is the Link Speed reported for the interface in question.

    When you did the Windows Explorer test, does this use the same interface?

     

    Wednesday, May 12, 2010 11:57 PM
  • That might make sense if the wireless interface got classified as Link Speed 10 Mbps.  The impression that I got is that the original poster was able to use Windows Explorer to transfer over this same interface at a much higher utilization.

    Chui, can you report back:

    In the Task Manager (taskmgr) Networking tab, what is the Link Speed reported for the interface in question.

    When you did the Windows Explorer test, does this use the same interface?

     


    The linkspeed will not say it will utilize the full 54Mbps. Some networking adapters will say it will has 54Mbps, but can max utilize of 10 Mbps.Or the router will say it can max utilize 10Mbps.

    I have a 54Mbps network adapter and a 54Mbps router. You would say I can utilize the full 54Mbps. But yet I can only send and receive at 10Mbps.

    • Edited by André Krijnen Thursday, May 13, 2010 12:07 AM Additional information.
    Thursday, May 13, 2010 12:06 AM
  • Dear all,

    I compare the speed in Task Manager using the same network adaptor. I can see that Windows Explorer is having a much higher maximum value than mine and complete much faster (i ignore the percentage, since I know that it is not accurate).

    So, regardless of whether it is 54mbps / 10mbps or whatsoever mbps, Explorer is simply 5 times faster.

    And I already mentioned in my post, I didn't wait for any response except when I first establish the connection.

    Thursday, May 13, 2010 11:50 AM
  • Why not post your sending routine? If you don't, all we can do is theorize; if you do, some of us might even give it a run and validate or invalidate your results, so you can, if necessary, submit a bug report somewhere...

    Cristian.
    Thursday, May 13, 2010 2:54 PM
  • When you speak of utilization are you speaking of BPS of FPS?  If you, as you claim "I can send at almost MAX speed when using a Gagibit lan on the same computer. So there is nothing wrong / inefficient on my code.", then that tells me that you are using max packet size, assuming you mean BPS.

     

    For the wireless try a smaller packet size and see if the throughput doesn't go up.


    Subnet Planner - http://www.vbforums.com/showthread.php?p=3789524
    Friday, May 14, 2010 12:19 PM