Re: TcpClient buffer size limit?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Sharon" <Sharon@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:991375CB-A242-43E3-8749-65D0B23181AC@xxxxxxxxxxxxxxxx
> Hi Willy,
>
> Ok' I'll try to make my case clearer:
> I'm developing an application that uses a Frame Grabber that produce 100
> mega byte frames.
> The application need to distribute these frames to several computers,
> frame1
> to pc1, frame2 to pc2, frame3 to pc3 and so on.
> The frames are generated in very high speed, therefore the frames
> transmission must also be very fast.
> So I'm looking for the optimum TCP connection and configuration to achieve
> the fastest speed.
> We are also using (in the near future) GLAN, dual Xeon PC's with Windows
> XP.
>
> From the tests I did, I found that a bigger TCP buffer making the
> transmission faster (of course there is a limit for that).
>
> Yes, I'm using simple synchronous socket IO and not an asynchronous. Why
> should I prefer the the asynchronous transmission? Will it make the frames
> transmission faster?
>
You should use an asynchronous pattern if you need to prepare some further
data while the actual data is being transmitted, or you when you have to
process the received data while receiving the next buffer.
That doesn't mean one is faster than the other, it's just a matter for
finding the perfect balance between CPU occupation, network throughput
without wasting precious resources like user/kernel memory.


> I'm not sure I understand what you mean when you say "using the default
> per
> interface type TCP registry settings and an application buffer size of 64K
> you can easily saturate a single Gigabit network interface."
> Can you please elaborate on that?
>
Yes, the TCP stack in XP and higher is self tuned, that means that a number
of parameters are adjusted automatically depending on the interface type and
characteristics and available RAM memory.
For instance a Gigabit interface will have a default TcpWindowSize of 64K at
the winsock API level, while a 10-100MBit interface has a window size of
17Kb (note that this is a maximum, windows will adapt this value depending
on how routers are configured, or to the receiving side's TcpWindowSize if
it's smaller).
Now without adapting the defaults (by adding the parameters to the
registry), you can saturate a Gigabit LAN interface when transferring large
chunks of data between two TCP/IP endpoints. For instance I achieved a
transfer rate of ~112MBytes/sec. (95% of the aggregate bandwidth) between
two PC's running XP connected through a GB switch.

Willy.





.



Relevant Pages

  • Re: Help: a handheld image processing device
    ... LCD interface and camera ... 10 frames per second is a different kettle of fish. ...
    (comp.arch.embedded)
  • Re: ath vap - second hostap _almost_ works
    ... I am able to create and configure the wlan1 interface and clients can ... see the SSID and associate to the network. ... 1971 rx management frames ...
    (freebsd-current)
  • Re: catalyst3560 and citrix sessions problem
    ... Check if the router for Vlan 4 is sending CDP on interface Gi 0/4 ... I can not give now any other than show interface GigabitEthernet0/4 ... input packets with dribble condition detected ... 6 collision frames ...
    (comp.dcom.sys.cisco)
  • Re: video renderer dropping frames
    ... > So I have implemented the IVideoFrameStepping suggestion but the interface ... I have my own video renderer filter ... It could be or it could be that another filter in your graph does not ... > then all frames would just get queued up. ...
    (microsoft.public.win32.programmer.directx.video)
  • RE: suffering from an apparently broken tcp
    ... suffering from an apparently broken tcp ... that outgoing packets had a checksum error at the TCP layer. ... Most of the time three TCP continuation frames come in back-to-back, ... it's only on the local network that's dreadfully slow. ...
    (Debian-User)