Alan DeKok <aland@deployingradius.com> writes:
Pierre Rondou wrote:
It's possible that you're simply sending packets too fast. If the server doesn't read them from the socket quickly enough, the kernel will simply discard them.
Well, then, why is this only happening in the multi-thread mode? If it was a kernel issue, wouldn't it drop the packets in the same way for the single-thread version?
No. I mean that the threading code has overhead which doesn't exist in the non-threaded mode. Lock contention is a *major* source of lost CPU time in threaded applications.
If the server is too slow to process requests, the kernel will throw away the UDP packets. This happens when the server is slow... whether it's threaded or not.
But then the client won't get the acks and retransmit. If I understood correctly, then the problem is the packets *are* acked but not logged. File locking problem when multiple threads are attempting to update the same file? Bjørn