lkml.org 
[lkml]   [2000]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Minimizing dropped UDP packets
On Tue, Oct 24, 2000 at 10:42:29PM -0100, Frank Hansen wrote:
> /proc/sys/vm/freepages (to 512 1024 1536), which did not seem to yield
> any better performance.
> Disabling interrupts on the IDE drives seemed to roughly halve the
> number of dropped packets (using /sbin/hdparm -c 1 -d 1 -k 1 -u 1
> /dev/hdx) , but the problem is still far worse than acceptable. The
> timestamps stored in the file suggest that when the problem occurs,
> 'recvfrom' might take up to 1.5 seconds to return any data to the
> application (reported by the difference in two calls to gettimeofday).
> Even though some of the data sent to the UDP socket is buffered by the
> network stack, this results in quite a large number of dropped packets.
> Upgrading from 2.2.12 to 2.2.17 did not improve the situation either.
>
> So how do I prevent this from happening?

1.5 seconds delay is definitely bogus, something must be very wrong with
your setup. Even an IDE disk with disabled interrupts should not generate
such extreme latencies. I would suspect some bug in your testing or your
program.

You could probably increase the per socket buffers using the
/proc/sys/net/core/rmem_{default,max} sysctl. The default buffer is only
32K, which is probably not enough for a protocol without flow control.

You could also use a multi threaded setup to eat latencies better (one
thread reading, one thread writing)

The real fix is to add flow control of course.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.072 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site