Questions tagged [sysctl]

For questions pertaining to sysctl, a utility used to read and modify, at runtime, the attributes of the system kernel such as its version number, maximum limits, and security settings. Use this tag for questions about sysctl itself or questions about issues arising from using the sysctl command-line utility.

Filter by
Sorted by
Tagged with
1 vote
2 answers
123 views

Why oom_reaper when having vm.panic_on_oom = 1

From what I understand from its author : The OOM killer currently allows to kill only a single task in a good hope that the task will terminate in a reasonable time and frees up its memory. (…) It ...
user avatar
  • 2,800
2 votes
1 answer
41 views

Does writing a newline character into a sysctl (/proc/sys) file have any effect?

Today I ran into some code that's writing a newline character explicitly into a sysctl file. See moby/docker source code. My first thought is that the author has diligently copied the shell's ...
user avatar
0 votes
1 answer
165 views

Values from sysctl -A don't match /etc/sysctl.conf even after restart

I'm on Mac Monterey 12.1 and increased my shared memory limits in /etc/sysctl.conf file: kern.sysv.shmmax: 16777216 kern.sysv.shmmin: 1 kern.sysv.shmmni: 128 kern.sysv.shmseg: 512 kern.sysv.shmall: ...
user avatar
2 votes
2 answers
141 views

Linux Page Cache Performance versus memcpy

I am benchmarking the write performance in the case that Linux writes the data to the page cache without throttling the process or syncing the data to the disk. The simple experiment I am doing looks ...
user avatar
2 votes
1 answer
111 views

increasing fs.file-max: what are the others kernel params need adjustments (for running kafka)

For running a kafka service (with jbod disks, where we encountered problems due to too many open files) with an increased LimitNOFILE of 500000, we decided to increase the fs.file-max from 500000 to ...
user avatar
  • 11k
0 votes
0 answers
105 views

nf_conntrack hashsize change doesn't work

I started having the issue "nf_conntrack is full, dropping packets". I have increased the max value with sysctl. But everywhere says you should also increase the hash table to be /4 of the ...
user avatar
  • 1,035
0 votes
0 answers
140 views

Can't set fs.nr_open limit via sysctl

I'm trying to set fs.nr_open via sysctl (for learning purpose) to different value, other than default 1048576 These are sysctl settings after system was booted: vud@ubuntu:~$ sudo sysctl -a | grep -E '...
user avatar
  • 1
1 vote
0 answers
379 views

Debian 11 - sysctl parameter 'net.netfilter.nf_conntrack_tcp_be_liberal' cannot be changed

I want to set to 1 the value of the sysctl parameter net.netfilter.nf_conntrack_tcp_be_liberal on some Debian 11-based systems I have, but I'm finding it impossible to do so. I've tried the following: ...
user avatar
  • 11
1 vote
0 answers
38 views

Setting TCP window size on older kernel

I have this: Linux 3.10.0 #1 SMP Thu Apr 22 16:18:59 MSK 2021 x86_64 x86_64 x86_64 GNU/Linux Trying to set this in sysctl.conf net.core.wmem_max = 12874368 net.ipv4.tcp_rmem = 4096 42380 12874368 net....
user avatar
  • 11
0 votes
0 answers
350 views

sysctl -w net.core.rmem_max=8388608 in Docker image affects host settings

Given the following sequence of commands run on a single machine with a Docker image present: HOST$ sysctl net.core.rmem_max net.core.rmem_max = 212992 DOCKER$ sysctl net.core.rmem_max net.core....
user avatar
  • 233
1 vote
1 answer
45 views

Disabling IPv6 leads to black screen on reboot

I tried disabling IPv6 using /etc/sysctl.conf and after a reboot I cannot get into any of the two DE that I have installed (I am using Pop! OS 20.04). Tried both Pop Desktop and KDE Plasma. The SSDM ...
user avatar
  • 13
2 votes
0 answers
203 views

IO Throttling After Reaching dirty_background_ratio

I am trying to understand the Linux IO throttling mechanism. This is what I got so far: By calling the write (fd, data, size) system call, the data will be written into the OS cache as dirty pages. ...
user avatar
0 votes
0 answers
43 views

Limit of connections between unix sockets and tcp/ip

I have a server with the following sysctl settings: net.ipv4.ip_local_port_range = 1024 65535 net.core.netdev_max_backlog = 65535 net.ipv4.tcp_max_syn_backlog = 50000 net.ipv4.tcp_max_tw_buckets = ...
user avatar
  • 1,035
2 votes
1 answer
848 views

net.ipv4.ip_forward not peristent, even in /etc/sysctl.conf

Currently i'm setting up a new Debian 11 Bullseye machine to act as a Wireguard gateway. Everything as usual, and simple. Unfortunately i am having a heavy issue regarding the IPV4 packet forwarding. ...
user avatar
0 votes
0 answers
52 views

Increase or decrease vm dirty ratio for my use case?

I have a server reading files from a glusterfs backend, and a local disk-cache using rclone, and serving them with nginx. I'm having issues with hung_task_timeout_secs with php-fpm. I have read those ...
user avatar
  • 1,035
1 vote
1 answer
53 views

what is the meaning of backslash in /etc/security/limits.conf

/etc/security/limits.conf looks like this #<domain> <type> <item> <value> # #* soft core 0 #* hard rss ...
user avatar
  • 11k
1 vote
1 answer
117 views

How to find sysctl.conf option name from /sys/devices path?

I found this answer that says I can enable/disable multicast snooping by writing to /sys/devices/virtual/net/br-lan/bridge/multicast_snooping "or in sysctl.conf". I'd like to make it ...
user avatar
  • 5,906
1 vote
1 answer
107 views

Where to get offline documentation/descriptions of individual sysctl kernel tunable parameters?

The NOTES section of $ man 5 sysctl.conf states: The description of individual parameters can be found in the kernel documentation. But is there a way for me to find this kernel documentation offline? ...
user avatar
1 vote
0 answers
3k views

Keep getting "No space left on device or exceeds fs.inotify.max_user_watches" despite setting a watch count to a higher value

I'm trying to a run a bitbake command to build an image but I see the following errors ERROR: No space left on device or exceeds fs.inotify.max_user_watches? ERROR: To check max_user_watches: sysctl -...
user avatar
  • 31
3 votes
2 answers
387 views

sysctl -p failed on /proc/sys/pcie_aspm

when we run the sysctl -p on our rhel 7.2 server1 we get sysctl -p fs.file-max = 500000 vm.swappiness = 10 vm.vfs_cache_pressure = 50 sysctl: cannot stat /proc/sys/pcie_aspm: No such file or directory ...
user avatar
  • 11k
1 vote
1 answer
106 views

What steps must be taken to manually setup a shared internet connection?

I am looking to find out exactly what steps must be taken to manually provision a shared internet connection on a workstation running a Linux based operating system. I am aware that when using any ...
user avatar
0 votes
1 answer
122 views

sysctl disable_ipv6 value gets modified during bootup. How to find out who is modifying it

In /etc/sysctl.conf I have setting net.ipv6.conf.eth0.disable_ipv6=1. I can see after during init.d calling sysctl the value is set. Confirmed by reading sysctl net.ipv6.conf.eth0.disable_ipv6 to a ...
user avatar
  • 1
1 vote
1 answer
4k views

How to display current vm.map_max_map_count value?

I tried looking into /proc/sys/vm/max_map_count file and it says 'empty' I have added a line vm.max_map_count=16777216 in etc/sysctl.config and want to see if changes are applied. I have certain ...
user avatar
0 votes
1 answer
283 views

Is there any long-term side effect of setting vm.dirty_ratio to 0?

When I used to copy a data over a thumb-drive, even if the writing speed can't exceed 2 MiB/s to the thumb-drive, Linux first copies 600 MB data to it in one second - it just writes to the RAM as ...
user avatar
  • 1,645
2 votes
0 answers
73 views

Why does ifup seemingly ignore sysctl settings?

On a new CentOS 7 system, I'm trying to disable ipv6. I've added the following to /etc/sysctl.conf to do so: net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 On boot, the ...
user avatar
  • 263
0 votes
1 answer
780 views

Is kernel.keys.maxkeys per user or per key?

The Linux kernel's documentation on its Key Retention Service states that: /proc/sys/kernel/keys/maxkeys /proc/sys/kernel/keys/maxbytes These files hold the maximum number of keys that each non-root ...
user avatar
  • 711
2 votes
1 answer
1k views

How can I enable user namespaces and have it persist after reboot?

When I run podman I get, $ podman info cannot clone: Operation not permitted user namespaces are not enabled in /proc/sys/kernel/unprivileged_userns_clone Error: cannot re-exec process How can I ...
user avatar
  • 22.8k
1 vote
0 answers
76 views

Machine replies to "arp_requests" for internal addresses even though "net.ipv4.conf.<intf>.arp_ignore" is configured to disable this

I current have a node with an interface connected to the internet (through a VLAN). I will refer to these as eth0 and eth0.100, with the latter being the VLAN interface in the machine. I preemptively ...
user avatar
0 votes
1 answer
162 views

Disabled ipv6, but the setting doesn't persist after sleep

I added these lines to a .conf file in the directory /etc/sysctl.d net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 I then do sudo systemctl ...
user avatar
  • 2,095
4 votes
1 answer
6k views

If /etc/sysctl.conf doesn't exist, where is my sysctl storing configs?

I want to change two values using sysctl. One is the sysctl vm.swappiness=10 and the other, sysctl kernel.sysrq=1. However, when I run sysctl -p, it tells me sysctl: cannot open "/etc/sysctl.conf&...
user avatar
0 votes
0 answers
414 views

can't get sysctl.conf to set core_pattern

I need to make the following 3 changes to /proc/sys/kernel, and I'm able to make them from the command line fine. But when I put them into sysctl.conf, only the first 2 take on reboot. kernel.msgmax =...
user avatar
1 vote
2 answers
970 views

Confused about the diff between /etc/sysctl.conf vs /etc/security/limits.conf

I am on an Ubuntu18.04.1 bionic VM in the Azure cloud. I am trying to set the maximum number of file descriptors at the system level. When I initially logged in and ran ulimit -n I get a value of ...
user avatar
  • 11
1 vote
1 answer
4k views

What's the best dirty_background_ratio and dirty_ratio for my usage?

So I'm playing with dirty_background_ratio and dirty_ratio and hoping to find the right parameters with your professional help. For now I'm using: vm.dirty_background_ratio = 20 vm.dirty_ratio = 60 ...
user avatar
  • 107
1 vote
3 answers
3k views

What does the number in sysctl configuration file denote?

The sysctl utility allows a Linux admin to query and modify kernel parameters in runtime. For example, to change the swappiness of a Linux system to 0, we can: echo 0 > /proc/sys/vm/swappiness Or ...
user avatar
  • 1,645
0 votes
0 answers
62 views

Reboot frozen system

Due to some reason, my machine is not responding and remains in frozen state. I am unable to ping it I am unable to use keyboard/mouse No script runs as per scheduled in cron Only way to use the ...
user avatar
  • 13.5k
6 votes
2 answers
2k views

Linux Kernel.org misleading about kernel panic /proc/sys/kernel/panic

I always have /proc/sys/kernel/panic set up to 0. Looking at description of this option in kernel.org we can see: panic: The value in this file represents the number of seconds the kernel ...
user avatar
  • 615
6 votes
1 answer
2k views

How to set sysctl using kernel command line parameter?

Is it possible to set Linux kernel sysctl settings (those usually set in /etc/sysctl.d) using kernel command line (those visible in /proc/cmdline)? (Using grub config file /etc/default/grub variable ...
user avatar
  • 1,599
0 votes
0 answers
144 views

limits.conf nproc not being applied

this is our limits.conf * soft nofile 999999 * hard nofile 999999 * soft noproc 256000 * hard noproc 256000 and then we check for the changes after a reboot, ...
user avatar
5 votes
2 answers
524 views

Customize sysctl parameters by user

I know there's *.conf file in /usr/lib/sysctl.d and/or /etc/sysctl.d folders ready to establish kernel parameters on boot. But they are general; what I want is to customize some of these parameters (...
user avatar
  • 180
1 vote
1 answer
835 views

Why does UFW use a different sysctl.conf file?

There are a lot of network-related settings in /etc/sysctl.conf and a number of files in /etc/sysctl.d/. My data centre operator who has preconfigured the Ubuntu OS to work best in their environment ...
user avatar
  • 203
0 votes
1 answer
647 views

sysctl changes persist after removing conf file and reboot

I have a package which installs a sysctl config file to /etc/sysctl.d in order to "tune" some default settings. For example, some are net.ipv4.tcp_congestion_control = agilesd net.ipv4....
user avatar
0 votes
1 answer
129 views

sysctl -a doesn't include log_buf_len

I hope to check the value of log_buf_len via sysctl, but sysctl -a doesn't show it, why and is there any other way to check its value
user avatar
  • 287
0 votes
0 answers
152 views

lsof show number of open files that are more then what configured [duplicate]

we verify the file max as [root@linux02 ~]# cat /proc/sys/fs/file-max 500000 but when we run lsof we get [root@linux02 ~]# lsof | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/...
user avatar
  • 11k
2 votes
1 answer
664 views

How to use sysctl on UNIX variants, e.g. macOS, to read information normally found in /proc/self on Linux?

I've been using /proc/self for a long time to read process-related information like /proc/self/maps etc. However, on some UNIX variants, like macOS, the procfs filesystem is not implemented; but as ...
user avatar
  • 3,357
1 vote
1 answer
227 views

Is -w option of sysctl really needed when changing kernel parameters?

sysctl has this -w switch. Is it really needed? I tried to do: sysctl vm.max_map_count=262144 And it seems to have worked out.
user avatar
  • 2,913
3 votes
1 answer
2k views

How to disable iptables from kernel

I'm famillar with iptables -F and other features of iptables. I need to disable iptables from kernel, of course I prefer to disable from sysctl instead of recompiling the kernel.
user avatar
  • 10.2k
1 vote
1 answer
409 views

How do I revert sudo sysctl -w kernel.unprivileged_userns_clone=1?

I did this in order to execute "brave browser" in my new debian installation. sudo sysctl -w kernel.unprivileged_userns_clone=1 I've read this maybe a potential risk for my machine security how do I ...
user avatar
  • 223
0 votes
1 answer
912 views

remove specific sysctl.conf setting

on some of my machines i have this block of setting in sysctl.conf(the numbers are different on each machine) : #Size Of RAM (In GB): 23 kernel.shmmni= 2547 kernel.shmmax= 365482458 kernel....
user avatar
2 votes
1 answer
397 views

Is `vm.swapiness=0` equivalent to `swapoff -a` (in kernel >= 3.5)

Is setting in /etc/sysctl.conf: vm.swappiness=0 equivalent (except that it's persistent) to running swapoff -a, *in Linux kernels >= 3.5? *in earlier kernel versions, 0 meant 'no swapping until out ...
user avatar
  • 1,608
1 vote
1 answer
376 views

What's the default value of the admin_reserve_kbytes kernel parameter?

Many of the kernel parameters have default values assigned. But some of them aren't really clear. I'm reading the proc manual and in the case of admin_reserve_kbytes we can read the following: The ...
user avatar