What is the default size of datagram queue length in Unix Domain Sockets (AF_UNIX)? Is it configurable?

c, datagram, linux-kernel, sockets, unix

Solution

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?.

Problem

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!

Original source

Related problems