I know the maximum length of a datagram queue length can be found using "cat /proc/sys/net/unix/max_dgram_qlen".
I wanted to know how to find the default value that is set on boot up (like in case of the /proc/sys/net/core/wmem_default for the send buffer size).
Is it possible to increase the value of max_dgram_qlen? What is the upper limit of the same?
My kernel version is 2.6.27.7. I'm new to Unix Domain Socket programming (AF_UNIX).
Thanks in advance for any comments / solutions!
The previous answers/comments failed to understand that the OP was talking about maximum queue length in datagrams (max_dram_qlen) and not in bytes. The OS provides settings for both sizes.
You can set max_dgram_qlen
using the following command:
sysctl net.unix.max_dgram_qlen=128
You may need to run with sudo
and you may also need to put double quotes around max_dgram_qlen=128
depending on your shell.
Also, see What's the practical limit on the size of single packet transmitted over domain socket?.
man unix(7):
The SO_SNDBUF socket option does have an effect for UNIX domain sockets, but the SO_RCVBUF option does not. For datagram sockets, the SO_SNDBUF value imposes an upper limit on the size of outgoing datagrams. This limit is calculated as the doubled (see socket(7)) option value less 32 bytes used for overhead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With