Page 1 of 1

"/etc/sysctl.conf" not run at boot

Posted: 09 Apr 2020, 15:13
by fer_j_lop
Hello.

I'm using PLEX as multimedia server with a big music library (30k folders). To speed up the database update with changes I've included "fs.inotify.max_user_watches = 32768" in "/etc/sysctl.conf", the "sysctl -p" command activates it. After reboot the value returns to 8192. I've added the "sysctl" command as @reboot process with "crontab" as temporary solution and now the six configuration values are run at boot time.

=====================================
net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_max_syn_backlog = 4096
net.core.netdev_max_backlog = 4096
net.core.somaxconn = 4096
vm.overcommit_memory = 1
echo fs.inotify.max_user_watches = 32768
====================================

@TERRAMASTER SUPPORT: Can you pls check the system configuration to run "/etc/sysctl.conf" as system boot?

Thanks

Re: "/etc/sysctl.conf" not run at boot

Posted: 09 Apr 2020, 17:21
by Asgaroth
This will fail:

Code: Select all

echo fs.inotify.max_user_watches = 32768
it should be:

Code: Select all

fs.inotify.max_user_watches = 32768

Re: "/etc/sysctl.conf" not run at boot

Posted: 09 Apr 2020, 18:06
by fer_j_lop
Hi Asgaroth

Thanks for your comment, you're right. It has been a copy/paste mistake writting my previous post. The exact "/etc/sysctl.conf" in my F5-221 is:

=================================
net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_max_syn_backlog = 4096
net.core.netdev_max_backlog = 4096
net.core.somaxconn = 4096
vm.overcommit_memory = 1
fs.inotify.max_user_watches = 32768
=================================

With the previous content in "/etc/sysctl.conf" the command "cat /proc/sys/fs/inotify/max_user_watches" returns 32768. (After addind the corresponding row with "crontab" to root file):

============================================
*/1 * * * * /etc/init.d/nas/everyminuteexec
10 * * * * /etc/init.d/nas/everyhourexec
20 0 * * * /etc/init.d/nas/everydayexec
0 12 * * * ntpdate de.ntp.org.cn
@reboot /sbin/sysctl --load=/etc/sysctl.conf
============================================

Regards.


Regards.

Re: "/etc/sysctl.conf" not run at boot

Posted: 09 Apr 2020, 23:24
by TMroy
Sure, will check it and come back to you soon.

Re: "/etc/sysctl.conf" not run at boot

Posted: 10 Apr 2020, 14:44
by TMroy
Hi fer_j_lop,
To add '/etc/sysctl.conf' to your system boot, you need to add 'sysctl -p' to under line of the command '/etc/init.d/rcS'.

Re: "/etc/sysctl.conf" not run at boot

Posted: 10 Apr 2020, 16:53
by fer_j_lop
Good morning.

The solution works OK, thanks a lot.

Regards.