UDP c++ client/server with 700 Mbps rate
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: UDP c++ client/server with 700 Mbps rate

  1. #1
    Join Date
    Aug 2014
    Posts
    3

    UDP c++ client/server with 700 Mbps rate

    Hi all,

    How can I improve the speed of udp client/server in order to reach 700 mega bit per second send and receive speed through c++ in under Linux.

    Both my client and server pc hasve gigabit ethernert adapter, switch is a Gigabit switch, and I use Cat 5e cable.
    But the max rate that I acheive is abou 16 mega byte per second.

    Thanks.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,352

    Re: UDP c++ client/server with 700 Mbps rate

    How big are your packets?
    Victor Nijegorodov

  3. #3
    Join Date
    Aug 2014
    Posts
    3

    Re: UDP c++ client/server with 700 Mbps rate

    Quote Originally Posted by VictorN View Post
    How big are your packets?

    I tested with different packet sizes; 1500byte, 3000bytes and 9000bytes.

    I also have the same problem with raw socket packet sniffer.

    I addition some packets always lost. I found it by runing wireshark simultaneously with my program.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,352

    Re: UDP c++ client/server with 700 Mbps rate

    Well, 16 mega byte per second is 112 Mbit per second. It is 1/6 of the max available 700 Mbit/sec rate.
    The rate might depend on the number of routers in the network and number of PCs...

    As for
    ... some packets always lost
    it is just "by design" of UDP which
    ... provides a connectionless transmission protocol. This means there are no guarantees that data sent on one end is delivered to the other—or that there is another end at all, for that matter.
    Victor Nijegorodov

  5. #5
    Join Date
    Aug 2014
    Posts
    3

    Re: UDP c++ client/server with 700 Mbps rate

    there are only 2 computers in this network, the sender and the receiver.

    I know that udp is connection less but I the data receive to the receiver computer and the program cannot get it, since the wireshark capture the data.

  6. #6
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,827

    Re: UDP c++ client/server with 700 Mbps rate

    Myth: gigabit eternet will give you 1Gb/s transfer rate.


    The above speed is the link transfer, it doesn't say much about actual throughput you'll get from connection to connection.
    There is overhead in encoding the digital data into electrical signals to go over cat5 electrical wire and there is overhead in decoding the electrical signal back into digital data (you can mitigate this with fiber optical cabling)
    there is overhead in sending data to the network device. You can't send it to the network device faster than your system's I/O bus, and you can't send it faster than your memory can handle, or faster than your system can generate the data to send.
    and there is overhead in receiving data from the network device.
    there is overhead in managing the ethernet protocol and the CSMA/CD technology.
    The OS is typically throttling clients, and single server to client connections (windows is quite aggressive in this, most Linux dists have it disabled by default, there's pro's and cons to either stance of that).
    any intermediate switches/repeaters or routers (especially NAT routing) will slow down as well.
    your network protocol has overhead, this can be significant on small packets for highest throughput increase window size and packet size.


    if you can get 40% of the link speed in actual streamed throughput you are doing VERY well (jumbo frames). (expect 25% ish in 'normal' scenarios)
    if you can get 10% on interactive network, you are doing VERY well.
    don't rely on numbers on task manager or the performancemeters.
    There are specific test apps that will test actual link speed (netcps, chariot)

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center