IOCP receive strategy



Hi,
I need to write a high-performance client and server. They need to
send/receive 30-60 streams each with 1Mbit-50Mbit over TCP.
Server is simple - it uses simple circular buffer, all messages are
written to the buffer first, next overlapped requests are generated
but no more than some predefined limit. When one request are
completed , next is created pointing to the next part of the buffer
( saving locked/non-paged memory ).
But I have problems with a client. Which strategy is the best one:
a) posting zero-buffer receives, enlarging receive buffer to some
reasonable size ( lets say 256kB ). Next reading that buffer into my
message buffer, when the whole message is received pass it to my
application.
b) posting a few receive requests. I have problems how many requests I
should post and what size of the request I should use. Copying data is
still needed because I need to assembly messages as they were sent,
and they can be divided into many recv requests. Additionally much
space can be wasted because recv will not fill the provided buffers.

Is this really a much performance with b) over a) ? The first case
seems to be much easier to implement.
.



Relevant Pages

  • Re: AWR Sample Report
    ... Shared Pool Size: 1,264M 1,264M Log Buffer: 14,344K ... Cached Commit SCN referenced 35,858,913 1,662.63 1,476.95 ... IMU Redo allocation size 11,813,948 547.76 486.59 ... physical read IO requests 5,242,302 243.06 215.92 ...
    (comp.databases.oracle.server)
  • Re: [CFT][PATCH] new scheduler policy
    ... "The X server uses selectto detect clients with pending input. ... executing requests from the client with the smallest file descriptor. ... Each client has a buffer which is used to read some data from the ...
    (Linux-Kernel)
  • Re: Heap fragmentation caused by .NET remoting (TcpServerSocket)
    ... > I'm looking at a remote call to my server and the buffer is pinned until ... > thread pool is overloaded and the server requests are being starved. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: gvinum raid5 performance seems slow
    ... No, this works at the bio layer, where everything is cushioned on ... buffer cache. ... more than 32 kB for a five disk array, ... first few requests that were only buffered and not actually sent out ...
    (freebsd-performance)
  • Re: usb camera filter driver
    ... Continue i want get buffer from webcam and display on my application. ... // filter deviceobject attached to the pnp stack. ... // Here we will handle the IOCTl requests that come from the app. ... I write usb camera filter driver, i see toaster filter example in DDK ...
    (microsoft.public.development.device.drivers)

Loading