* UDP buffer size? setsockopt(SOL_SOCKET, SO_RCVBUF)
@ 1996-07-18 4:00 Curt Smith
1996-07-24 4:00 ` Ralph Doncaster
0 siblings, 1 reply; 3+ messages in thread
From: Curt Smith @ 1996-07-18 4:00 UTC (permalink / raw)
Hi,
I'm suspecting that DEC Unix, v3.2d-2, IP stack is ignoring my
setting of the recv/send buffers >> 32k. In fact it seems that
the UDP packet buffers are only about 16kb as measured by when
I start seeing dropped UDP packets, within same box.
Does anyone know how to raise the buffer size to 64kb or larger,
so for example, 64 1024byte packets can be sent in a tight loop
before the receiving task will start seeing dropped packets??
How about the header file:
/sys/include/net/bpf.h:
#define BPF_MAXBUFSIZE 0x8000
Which tells me that it will only allow up to 32k buffers.
My observations are that DUX starts dropping packets at around
16kb of un-read UDP pkts sent.
Any ideas?
Thanks.
Curt Smith
curts@compgen.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: UDP buffer size? setsockopt(SOL_SOCKET, SO_RCVBUF)
1996-07-18 4:00 UDP buffer size? setsockopt(SOL_SOCKET, SO_RCVBUF) Curt Smith
@ 1996-07-24 4:00 ` Ralph Doncaster
1996-07-25 4:00 ` lemahieu
0 siblings, 1 reply; 3+ messages in thread
From: Ralph Doncaster @ 1996-07-24 4:00 UTC (permalink / raw)
Curt Smith wrote:
>
> Does anyone know how to raise the buffer size to 64kb or larger,
> so for example, 64 1024byte packets can be sent in a tight loop
> before the receiving task will start seeing dropped packets??
>
> How about the header file:
>
> /sys/include/net/bpf.h:
>
> #define BPF_MAXBUFSIZE 0x8000
Did you try setsockopt(SO_SNDBUF...)?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: UDP buffer size? setsockopt(SOL_SOCKET, SO_RCVBUF)
1996-07-24 4:00 ` Ralph Doncaster
@ 1996-07-25 4:00 ` lemahieu
0 siblings, 0 replies; 3+ messages in thread
From: lemahieu @ 1996-07-25 4:00 UTC (permalink / raw)
Ralph Doncaster wrote:
>
> Curt Smith wrote:
> >
> > Does anyone know how to raise the buffer size to 64kb or larger,
> > so for example, 64 1024byte packets can be sent in a tight loop
> > before the receiving task will start seeing dropped packets??
> >
> > How about the header file:
> >
> > /sys/include/net/bpf.h:
> >
> > #define BPF_MAXBUFSIZE 0x8000
>
> Did you try setsockopt(SO_SNDBUF...)?
I think you'll find that most Linux systems come with max buffer
size of 32K for a socket. Using setsockopt(SO_SNDBUF) can only set
it up to this maximum size. This system parameter can probably be changed by
recompiling the kernel and setting some option, or there may be some other
way to set this maximum buffer size. Systems I've seen usually range
from 32K to ~64K max buf size (Linux typically 32K, AIX typically ~64K,
Sun OS typically ~52K, but all should be configurable at the kernel
by a sysadmin).
Be aware that if you're using UDP, setting a sendbuf size only has
the effect of essentially setting the maximum packet size you can send.
Repeatedly sending many small UDP packets very quickly can result
in local packet losses due to lack of buffer space, and this may not
be reported back to you as an error when you do the send. This is
probably implementation dependent (I know this happens in AIX, I don't
know about Linux). Anyways, take it into consideration for portable code
if you happen to be using UDP.
--Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-07-25 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-07-18 4:00 UDP buffer size? setsockopt(SOL_SOCKET, SO_RCVBUF) Curt Smith
1996-07-24 4:00 ` Ralph Doncaster
1996-07-25 4:00 ` lemahieu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox