From: lemahieu@paradise.caltech.edu
Subject: Re: UDP buffer size? setsockopt(SOL_SOCKET, SO_RCVBUF)
Date: 1996/07/25 [thread overview]
Message-ID: <31F7C3CF.41C6@paradise.caltech.edu> (raw)
In-Reply-To: Dv2B2q.7pD@on.bell.ca
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
prev parent reply other threads:[~1996-07-25 4:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox