Questions tagged [sysctl]

sysctl is a mechanism for controlling options and limits in the Unix-like operating system kernels. Sysctls can be used to tune performance or change behaviors of many subsystems.

Linux:
The sysctl command and configuration file use the /proc filesystem's sys directory to read information and apply changes.

The Linux Journal has an article about using sysctl, but most for the most complete information look to this description of /proc/sys's contents.

BSD-derived:
The sysctl command is used to read and configure certain system settings. The Handbook describes its general use in more detail, and the FreeBSD Performance Tuning Community Wiki has some ideas.

120 questions
9
votes
2 answers

Higher rmem_max value leading to more packet loss

The rmem_max Linux setting defines the size of the buffer that receives UDP packets. When traffic becomes too busy, packet loss starts occurring. I made a graph showing how packet loss increases depending on the incoming bandwidth. (I use IPerf to…
Nicolas Raoul
  • 1,334
  • 7
  • 22
  • 43
9
votes
4 answers

After reboot debian box ignore sysctl.conf values

Where is right place for sysctl redefined values? I have: > uname -a Linux note 3.1.0-1-amd64 #1 SMP Tue Jan 10 05:01:58 UTC 2012 x86_64 GNU/Linux > cat /etc/debian_version wheezy/sid > tail -n 2 /etc/sysctl.conf # net.ipv6.bindv6only=0 But…
Korjavin Ivan
  • 2,250
  • 2
  • 26
  • 41
9
votes
2 answers

Postgresql Performance - Adjusting SHMMAX and SHMALL

I've read just about everything there is online about improving postgres performance, but the "right" values for SHMMAX and SHMALL still elude me. The consensus seems to be SHMMAX = total_memory/4 and SHMALL = total_memory/2 are safe starting…
Enrico
  • 491
  • 2
  • 6
  • 15
8
votes
2 answers

Netstat -s showing (and growing) "packets pruned from receive queue" and "packets collapsed in receive queue"

we are seeing the following: [root@primary data]# netstat -s | grep buffer ; sleep 10 ; netstat -s | grep buffer 20560 packets pruned from receive queue because of socket buffer overrun 997586 packets collapsed in receive queue due to low…
anonymous-one
  • 1,018
  • 7
  • 27
  • 43
8
votes
2 answers

Modifying kernel shared memory settings on a lion install

What's the location of the sysctl.conf file on lion? In Snow Leopard it was in /etc/sysctl.conf but now that folder doesn't contain it anymore. Searching for the file in spotlight yields no results. Have the shared memory settings been moved to a…
8
votes
1 answer

Why change net.inet.tcp.tcbhashsize in FreeBSD?

In virtually every FreeBSD network tuning document I can find: # /boot/loader.conf net.inet.tcp.tcbhashsize=4096 This is usually paired with some unhelpful statement like "TCP control-block hash table tuning" or "Set this to a reasonable value."…
sh-beta
  • 6,838
  • 7
  • 47
  • 66
8
votes
3 answers

What does tcp_orphan_retries set to 0 mean?

Does setting tcp_orphan_retries to 0 mean there is no limit to retries, or does it mean that it won't retry at all?
benjarrell
  • 188
  • 1
  • 8
8
votes
3 answers

sysctl.conf not running on boot

At what point is sysctl.conf supposed to be read during boot, and why might it not be running? I have the following settings which are not being applied when I reboot: net.bridge.bridge-nf-call-arptables = 0 net.bridge.bridge-nf-call-ip6tables =…
Brian
  • 796
  • 1
  • 6
  • 15
7
votes
2 answers

Why isn't net.ipv4.tcp_rfc1337 enabled by default?

The tcp_rfc1337 setting seems to have a solution for TIME-WAIT Assassination. The first problem is that old duplicate data may be accepted erroneously in new connections, leading to the sent data becoming corrupt. The second problem is that…
Nuno
  • 553
  • 2
  • 8
  • 26
6
votes
2 answers

sysctl vs writing directly to /proc/*

On a typical linux machine you can change kernel configuration by modifying the files located at /proc/*. For example, for the IPv6 accept_dad parameter of a specific network interface (say, eth0), you'd modify the following…
Adelin
  • 109
  • 10
6
votes
3 answers

OOM invoked with plenty of free swap

I am running an ARM router with i2p and tor on it - a Netgear R7000. Of course I've added a full 512 MB of SWAP to it to prevent OOMs, understanding that it could slow down the system... But then I still get OOM killer starting with plenty of SWAP…
Evengard
  • 234
  • 3
  • 12
6
votes
3 answers

Permission denied for root to change inotify max_user_watches, how solve this?

As root in a CentOs 6.4 server I got this error in an application: Fri May 16 01:45:23 2014 Error: Terminating since out of inotify watches. Consider increasing /proc/sys/fs/inotify/max_user_watches But when I try to run the command as root I got…
Samuel G. P.
  • 399
  • 2
  • 3
  • 10
6
votes
5 answers

sysctl -p /etc/sysctl.conf returns error

In a fresh installation of CenotOS 6 in a VPS after running sysctl -p /etc/sysctl.conf I got this errors: error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key error: "net.bridge.bridge-nf-call-iptables" is an unknown key error:…
Mohammad Ali Akbari
  • 1,763
  • 5
  • 20
  • 24
5
votes
3 answers

sysctl not sticking after reboot

Using Lubuntu 18.10 Cosmic Cuttlefish Most commands do stick. However Lynis has repeatedly demonstrated four sysctl parameters are not sticking on reboot. sysctl -p does successfully apply them after the system has started. fs.suid_dumpable=0…
tutudid
  • 63
  • 1
  • 1
  • 9
5
votes
0 answers

What is the difference between net.core.netdev_max_backlog and net.ipv4.tcp_max_syn_backlog

Several docs on the net describe these options as following: net.core.netdev_max_backlog: Maximum number of packets, queued on the INPUT side, when the interface receives packets faster than kernel can process…
madhead
  • 151
  • 6