[Verse-dev] sending packets too slow

Brecht Van Lommel brechtvanlommel at pandora.be
Mon Aug 22 22:51:22 CEST 2005


Hey,

Eskil Steenberg wrote:
> Hi
> 
> 
>>The problem is that even if 100 microseconds is passed to
>>select(), it waits at least 10 milliseconds. This is probably
>>directly related to the time quantum Mac OS X uses.
> 
> 
> This is a problem that is found all over. If you try to send more them one
> packet in a row the os will drop packets, and if you use any functionality
> like select(); switches the task and it takes too long time to return.
> 
> In the mac version there is also a problem where the buffer sizes are set
> to an illigal size. I dont know if this means that the buffers arent
> changed at all or if it means that the buffers are set to the maximum
> size. Try setting the buffers to a less agressive size and see if it makes
> a difference.
>
> I will get back to working on optimizing the out queue ASAP.

Setting a different buffer size makes no difference. The problem isn't that
performance is horribly slow (the 150 packets/s I get here isn't bad at all).
I just think it could be faster.

I am convinced you can send more than one packet at once. I wrote a little
test app and it seems it works ok up to ~85 packets, which matches the
send buffer size. This allowed sending 5000 packets/s.

But that was under ideal conditions of course.. on the same computer
with the client/server doing nothing but sending/receiving. Picking a good
send rate seems to be a difficult problem as I learned :). Not something
a simple hack as I proposed in my previous e-mail would fix...

Cheers,
Brecht.


More information about the Verse-dev mailing list