Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Remove quotes "

kern.ipc.somaxconn=2048

Test with /etc/rc.d/sysctl start

share|improve this answer
    
thanks, it works –  oraz Aug 18 '10 at 13:43

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.