4

Want to rise value of kern.ipc.somaxconn

With sysctl works ok

$ sudo sysctl kern.ipc.somaxconn=2048
$ kern.ipc.somaxconn: 128 -> 2048

check it:

$ sysctl -a|grep somaxconn
kern.ipc.somaxconn: 2048

But if I set this value in /boot/loader.conf or /etc/sysctl.conf:

$ cat /etc/sysctl.conf 
# $FreeBSD: src/etc/sysctl.conf,v 1.8 2003/03/13 18:43:50 mux Exp $
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#
kern.ipc.somaxconn="2048"

after reboot value of kern.ipc.somaxconn remains = 128

$ sysctl -a|grep somaxconn
kern.ipc.somaxconn: 128

How to make it persistent between reboots?

2 Answers 2

1

Remove quotes "

kern.ipc.somaxconn=2048

Test with /etc/rc.d/sysctl start

0
0

If you've written the value into /etc/sysctl.conf it should be persistent between reboots - the file is read from on reboot, not written to.

You can try sysctl -w kern.ipc.somaxconn=2048 instead. Also, how are you testing the change? Check:
cat /proc/sys/net/core/somaxconn

2
  • 1
    it should be persistent, but it's not with somaxconn, with other kernel values tunning all is ok
    – oraz
    Aug 18, 2010 at 12:34
  • 1
    man sysctl The -w option has been deprecated and is silently ignored. Also its FreeBSD not Linux - forget about /proc/sys Aug 18, 2010 at 13:24

You must log in to answer this question.

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