Sockets: Small packets - speed ?

Sockets: Small packets - speed ?

Post by Lars » Sun, 15 Jun 2003 22:39:12



Hi,

my application connects to a server through sockets, and it the starts
running a simple ACK/NAK protocol through this.

I cannot change the protocol - but i were wondering if there is anything i
can do on my Win32 application, that can enhance speed ? because its very
slow, transferring 9K takes almost 60 seconds.

I think the problem lies in that i cannot adjust the datapackets
transferred, they are only 10 bytes long - if they were K's long - then i
probably wouldnt notice any problems.

tried with SOCKET, and CASYNCSOCKET - and on several platforms - with same
result :(

Can you help ? thanks.

/Lars

 
 
 

Sockets: Small packets - speed ?

Post by Jerry Coffi » Mon, 16 Jun 2003 00:17:26




Quote:> Hi,

> my application connects to a server through sockets, and it the starts
> running a simple ACK/NAK protocol through this.

> I cannot change the protocol - but i were wondering if there is anything i
> can do on my Win32 application, that can enhance speed ? because its very
> slow, transferring 9K takes almost 60 seconds.

> I think the problem lies in that i cannot adjust the datapackets
> transferred, they are only 10 bytes long - if they were K's long - then i
> probably wouldnt notice any problems.

Under the circumstances, you can probably improve things by calling
setsockopt with the TCP_NODELAY flag.

Note that this should be done with care: under the circumstances it'll
almost certainly help, but most of the time it's more likely to hurt
throughput than improve it.

--
    Later,
    Jerry.

The universe is a figment of its own imagination.

 
 
 

Sockets: Small packets - speed ?

Post by Lars » Mon, 16 Jun 2003 02:50:15


thanks Jerry..

it didnt work though.

But i have located the major time-consumer....my dataprocessing routine
s***s - so it is my fault, have to rewrite the checksumcalculator etc.

thanks for your help.

/Lars

circumstances, you can probably improve things by calling

Quote:> setsockopt with the TCP_NODELAY flag.

> Note that this should be done with care: under the circumstances it'll
> almost certainly help, but most of the time it's more likely to hurt
> throughput than improve it.

> --
>     Later,
>     Jerry.

> The universe is a figment of its own imagination.