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
5
votes
3 answers

What is the default maximum value for /proc/sys/kernel/shmmax

I am having an amiguity as to what the maximum value in shmmax should be set. After having a look at my system's statistics, it shows the following: #cat /proc/sys/kernel/shmmax 18446744073692774399 #ipcs -l ------ Messages Limits -------- max…
Parth Pathak
  • 51
  • 1
  • 2
5
votes
1 answer

Increasing FreeBSD threads

For network apps that create one thread per connection (like Pound), threadcount can become a bottleneck on the number of concurrent connections you can server. I'm running FreeBSD 8 x64: $ sysctl kern.maxproc kern.maxproc: 6164 $ sysctl…
sh-beta
  • 6,838
  • 7
  • 47
  • 66
4
votes
4 answers

Shared memory: shmget fails: No space left on device -- how to increase limits?

I call shmget many times in my program, to get shm of of average size 85840 bytes. I obtain about 32771 shm ok, then shmget doesn't return a shm, but the error: "No space left on device". I have increased the kernel limits to: $ sysctl -A|grep…
j13r
  • 163
  • 1
  • 1
  • 7
4
votes
2 answers

How to make setting of kern.ipc.somaxconn persistent?

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…
oraz
  • 145
  • 2
  • 6
3
votes
1 answer

Redis and Postgresql on same machine: vm.overcommit_memory=?

In the Redis documentation it clearly states that vm.overcommit_memory should be set to 1 to ensure background saving newer fails: http://redis.io/topics/faq HOWEVER In postgresql documentation it says, that vm.overcommit_memory should be set to 2…
Niels Kristian
  • 358
  • 1
  • 3
  • 13
3
votes
1 answer

enabling ufw disables some of the settings in sysctl.conf

When I add rules to ufw and then enable it, some of my settings in sysctl.conf become void so I have to do sysctl -p after doing ufw enable. So for example one of my settings in sysctl.conf is to not reply to ping, after enabling ufw, you can ping…
Ulukai
  • 909
  • 2
  • 12
  • 29
3
votes
1 answer

No buffer space available and tuning with sysctl

Not really a network guy so please bear with me. I'm currently hosting a web application that sends UDP to all IP addresses in it's subnet periodically. That's 2048 IPs. My problem is it throws No buffer space available after sometime. I adjusted…
Bro Kevin D.
  • 141
  • 1
  • 6
3
votes
2 answers

nf_conntrack: table full, dropping packet

Mar 24 03:29:26 kernel: [1557411.243821] TCP: time wait bucket table overflow (CT0) Mar 24 03:29:26 kernel: [1557411.243828] TCP: time wait bucket table overflow (CT0) Mar 24 03:29:26 kernel: [1557411.243998] TCP: time wait bucket table overflow…
Tiffany Walker
  • 6,681
  • 14
  • 56
  • 82
3
votes
2 answers

Why do `net.inet.ip.forwarding` and `net.inet.ip.fw.enable` kernel sysctl settings stay enabled even after disabling them on an Xserve running 10.6.8?

Very bizarre situation. I have inherited a few Xservers from a previous admin that I have been charged with cleaning up on various levels. I am familiar with settings in Ubuntu and am very comfortable with the command line—including compiling from…
Giacomo1968
  • 3,542
  • 27
  • 38
3
votes
1 answer

How to make sysctl network bridge settings persist after a reboot?

I am setting up a notebook for software demo purpose. The machine has 8GB RAM, a Core i7 Intel CPU, a 128GB SSD, and runs Ubuntu 12.04 LTS 64bit. The notebook is used as a KVM host and runs a few KVM guests. All such guests use the virbr0 default…
user183394
  • 183
  • 1
  • 4
  • 8
2
votes
1 answer

cant counting all open files by lsof + lsof is hung

we are tying to count all open files by lsof lsof | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/42/gvfs Output information may be incomplete. but sill after 1 hour lsof not rerun answer ( like its stuck ) any other…
shalom
  • 461
  • 13
  • 29
2
votes
1 answer

AWS EC2 Amazon Linux is using swap even if it shouldn't

I have a few ECS servers running various apps. After a few mysterious outages I noticed that the instance is swapping hard and it consumes its IO Burst Balance rendering the instance useless. The facts: the machines are t2 and t3 instances with 2GB…
scream314
  • 23
  • 4
2
votes
0 answers

Debian 8 - TCP Overflows / TCP Drops

I have recently installed netdata on my Debian 8 server (monitoring software) and afetr installing my Debian 8 server is reporting the below two alerts constantly. 1m ipv4 tcp listen overflows = 37 overflows 1m ipv4 tcp listen drops = 3 drops I…
daygle
  • 41
  • 1
  • 5
2
votes
0 answers

Reaching maximum TIME_WAIT sockets (tried tcp_fin_timeout)

tl;dr: How do i get the kernel to drop TIME_WAIT/closing sockets as forcibly and fast as possible? I don't care about data being lost since I'm not sending any. I'm currently running a little test scenario on a very isolated machine. I'm running…
Torxed
  • 225
  • 1
  • 5
  • 18
2
votes
1 answer

Default values on missing procfs and sysctl settings

I have several questions regarding the handling of procfs or sysctl values. Can a feature be enabled with a missing /proc file? Does a missing /proc or sysctl entry always mean that the option is not enabled on that particular kernel? In other…
user5626466
  • 123
  • 6