[Prev][Next][Index][Thread]

[SUMMARY] sendto, ENOBUFS and mbuf



Hi managers,

I have received only one response from Christophe Sawicki
<sawicki@xxxxxxxxxxxxx>.
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@xxxxxx
> 

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@xxxxxxxxxxx
Paris, FRANCE                 |         deniel@xxxxxxxxxxxxxxxxx
                              | WWW   : http://www.worldnet.fr/~deniel
     All above opinions are personal, unless stated otherwise.


References: