[SUMMARY] sendto, ENOBUFS and mbuf

From: Laurent Deniel <deniel_at_worldnet.fr>
Date: Mon, 03 Mar 1997 20:02:04 +0100

Hi managers,

I have received only one response from Christophe Sawicki
<sawicki_at_alpha2.cae.ca>.
Merci Christophe.

My original post :

> In some special cases, when a lot of udp traffic are generated,
> the sendto system calls fails with the errno error code set to
> ENOBUFS. I may indicate that the interface output queue is full
> or that the kernel couldn't allocate a mbuf.
> So I wonder if there is a way to increase the number of
> buffer allocated for the network subsystem (mbuf) or/and the
> output queue limit ? (DU3.2 and 4.0)


Christophe Sawicki wrote:
>
> Well, you may want to look into the setsockopt() system call with the SO_SNDBUF
> option activated. This should fix your problem provided you have enough space
> for mbufs in the kernel. Keep in mind that increasing this value on many
> sockets which handle long lasting udp traffic bursts may create a deadlock
> condition. Such a deadlock condition appears when transmission processes are
> permanently blocked in a non-interruptible manner.
>
> Bonne chance et au plaisir de lire votre resume [SUMMARY] tres bientot,
>
> Christophe Sawicki
> chris_at_cae.ca
>

It appears that the problem was not related to a lack of mbuf
(the netstat -m command output does not show something abnormal).
Increase of the socket sending buffer (SO_SNDBUF) does not help.
The ENOBUFS error seems to be returned according to the amount of
outgoing _and_
incoming traffic on the interface (since more errors were generated at
sending side
when there was many incoming UDP packets).
A workaround was to delay the sending rate (from 1 to 10 msec).


Laurent.

--
Laurent DENIEL                | E-mail: deniel_at_worldnet.fr
Paris, FRANCE                 |         deniel_at_airsys.thomson.fr
                              | WWW   : http://www.worldnet.fr/~deniel
     All above opinions are personal, unless stated otherwise.
Received on Mon Mar 03 1997 - 20:35:35 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:36 NZDT