54

I can check its value by cat /proc/sys/net/core/somaxconn,

is it OK if I change it simply by echo 1024 > /proc/sys/net/core/somaxconn?

2 Answers 2

83

Yes. Alternatively, you can use:

sysctl -w net.core.somaxconn=1024

Add net.core.somaxconn=1024 to /etc/sysctl.conf for it to become permanent (be reapplied after booting).

2
  • so both /proc/sys/net/core/somaxconn and /etc/sysctl.conf are persistent?
    – linux_user
    May 20, 2011 at 1:17
  • 11
    @linux_user - no, only modifying /etc/sysctl.conf is persistent. /proc is not a "real" filesystem, only a filesystem interface to the kernel. May 20, 2011 at 4:11
2

yes /proc/sys/net/core/somaxconn is writable if you have the permissions to do so.

1
  • 10
    You would have to modify /etc/sysctl.conf as root to make it persistent. /proc is not a real file system Mar 16, 2015 at 0:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .