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
0 votes
0 answers
6 views

systemctl --type=service and systemctl list-unit-files do not show all services

I have wireguard installed on a Manjaro host, and Debian Server host The following commands show wireguard in the results on Manjaro, but nothing on the Debian server, yet the wireguard is definitely ...
Rachel1983's user avatar
1 vote
1 answer
37 views

How to enable IPv6 on subinterface in Linux using sysctl?

I tried the following: sysctl -w net.ipv6.conf.Ethernet1.200.disable_ipv6=0, but it gave following error: sysctl: cannot stat /proc/sys/net/ipv6/conf/Ethernet1/200/disable_ipv6: No such file or ...
gerrit_noob's user avatar
0 votes
1 answer
43 views

Difference between sysctl options to set system parameters

I see on the web two different commands to load sysctl custom parameters: sysctl --system sysctl -p Is there any difference between the two commands? I know the second one I posted can take the path ...
matteo-g's user avatar
  • 103
0 votes
2 answers
121 views

Edit configuration files idempotently

When editing configuration files, such as /etc/sysctl.conf for example, it is often useful to do the update in an idempotent way, meaning that if the script is executed multiple times, you don't end ...
user000001's user avatar
  • 3,615
0 votes
0 answers
18 views

It seems no directly mapping when set a grub boot parameter compare to set a sysctl parameter?

There is no direct mapping when setting a grub boot parameter compared to a sysctl parameter. My question is that there are two locations ( grub and sysctl config ) that may be set to the same feature/...
Mark K's user avatar
  • 865
0 votes
1 answer
72 views

What if kernel parameter conflicted in grub and sysctl?

For example, if I set oops=panic in grub command and I also set kernel.panic_on_oops=0 in sysctl config? ex: in /etc/sysctl.d/ What would happen? Are these two parameters mapping to the same function/...
Mark K's user avatar
  • 865
0 votes
0 answers
20 views

sysctl prameters seem not working on a VM

I am trying to tune my servers performance. To do so, I wanted to test some sysctl prameters such as net.core.somaxconn, net.ipv4.tcp_max_syn_backlog and net.core.netdev_max_backlog. Following were my ...
Sobhan Safdariyan's user avatar
1 vote
0 answers
127 views

How to change the permission of /dev/hugepages?

I have an app that open() a file under /dev/hugepages to allocate a huge page. For now, it requires root. How can I change the permissions? It's automatically mounted by F38 with: #/usr/lib/systemd/...
Alexis's user avatar
  • 637
1 vote
1 answer
214 views

Why does Linux needs both pid_max and threads-max?

I understand the difference between /proc/sys/kernel/pid_max and /proc/sys/kernel/threads-max. There's a good explanation at the answer to Understanding the differences between pid_max, ulimit -u and ...
aviro's user avatar
  • 5,062
0 votes
0 answers
26 views

Behaviour of networking after activating ip forwarding

Lets say I have two NICs in my computer. If I do something like sysctl -w net.ipv4.ip_forward=1 does the network stack start immediatelly forwarding packets from one NIC to the other NIC? Like kind of ...
ptiza_v_nebe's user avatar
-1 votes
1 answer
411 views

kernel parameters + what is the right way to refresh the kernel parameter from custom.conf after reboot

we set the following kernel parameters in file 99-custom.conf more /etc/sysctl.d/99-custom.conf net.ipv4.tcp_low_latency = 1 net.ipv4.tcp_adv_win_scale = 1 net.ipv4.tcp_max_syn_backlog = 30000 net....
yael's user avatar
  • 13.1k
0 votes
1 answer
1k views

What's the risk of running net.ipv4.route.flush

I'm setting up a Linux box through AWS and I'm exploring sysctl. When I run ip route I can see that there are already routes on the machine refering to 169.X.X.X addresses. Questions: What does ...
N. J's user avatar
  • 157
0 votes
1 answer
1k views

Why does setting the vm.watermark_scale_factor property increase ram consumption?

When I configure the vm.watermark_scale_factor property in /etc/sysctl.conf which is the property in charge of indicating to the kernel when the kswapd daemon starts to activate for paging from ram to ...
Todo-System Todo-System's user avatar
0 votes
0 answers
152 views

hdparm causes drive spin up after spindown

I have followed the manual of hdparm to try to make the drive spindown after a few minutes of inactivity but as soon as it spins down it turns back on again within 30 seconds but I don't hear any disk ...
mike_s's user avatar
  • 11
2 votes
1 answer
312 views

strange issue, worst network speed and worst ping latency on linux

I cannot explain this, I will start by listing these speed test results this one is the linux host running mxlinux latest version this one is the windows 10 running inside vmware on the same computer ...
Fredou's user avatar
  • 131
1 vote
0 answers
107 views

ip_nonlocal_bind not working

I have 2 servers, same specs, OS (ubuntu 20.04), networks and don't have ndppd installed. One has 2602:fe90:100:41::/64, other has 2602:fe90:100:40::/64 After enabling net.ipv6.ip_nonlocal_bind=1 on ...
Noob Linux's user avatar
0 votes
1 answer
134 views

Difference between fstab commit and sysctl for writing back dirty data to disk

For reducing the number of disk writes, what is the difference between using fstab to change the disk commit frequency and using sysctl for controlling when dirty data is written back to disk?
calvinjarrod's user avatar
1 vote
1 answer
5k views

Diffence between `systemd-sysctl` and `sysctl`

What is the main difference between systemd-sysctl vs sysctl and when to use either? Both are present in my debian based system.
borz's user avatar
  • 125
22 votes
2 answers
8k views

kernel 5.10.119 caused the values of /proc/sys/kernel/random/entropy_avail and poolsize to be 256

After update to kernel 5.10.119, /proc/sys/kernel/random/entropy_avail became stuck to 256 and does not change when moving the mouse. It used to be greater than 3000. # cat /proc/sys/kernel/random/...
user528206's user avatar
2 votes
2 answers
3k 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 ...
MC68020's user avatar
  • 7,704
2 votes
1 answer
347 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 ...
Philip Couling's user avatar
1 vote
2 answers
2k 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: ...
user997112's user avatar
  • 1,015
2 votes
2 answers
624 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 ...
Gongotar's user avatar
2 votes
1 answer
846 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 ...
yael's user avatar
  • 13.1k
0 votes
0 answers
828 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 '...
vudex's user avatar
  • 1
1 vote
0 answers
1k 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: ...
3d0's user avatar
  • 11
1 vote
0 answers
150 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....
KreonZZ's user avatar
  • 11
0 votes
0 answers
2k 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....
Ken Y-N's user avatar
  • 253
1 vote
1 answer
316 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 ...
ZeroVector's user avatar
2 votes
0 answers
816 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. ...
Gongotar's user avatar
0 votes
0 answers
133 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 = ...
Freedo's user avatar
  • 1,255
2 votes
1 answer
3k 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. ...
Fabian Druschke's user avatar
1 vote
1 answer
118 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 ...
yael's user avatar
  • 13.1k
1 vote
1 answer
402 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 ...
Malvineous's user avatar
  • 6,813
2 votes
1 answer
263 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? ...
Jethro Cao's user avatar
2 votes
2 answers
10k 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 -...
Jazzy's user avatar
  • 141
3 votes
2 answers
906 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 ...
yael's user avatar
  • 13.1k
1 vote
1 answer
708 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 ...
apt-getschwifty's user avatar
1 vote
1 answer
247 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 ...
xirtam's user avatar
  • 11
6 votes
1 answer
16k 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 ...
new User's user avatar
0 votes
2 answers
1k 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 ...
15 Volts's user avatar
  • 2,059
2 votes
0 answers
123 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 ...
rinogo's user avatar
  • 293
0 votes
1 answer
2k 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 ...
Rovanion's user avatar
  • 949
2 votes
1 answer
3k 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 ...
Evan Carroll's user avatar
  • 30.4k
1 vote
0 answers
211 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 ...
stoneman's user avatar
0 votes
1 answer
371 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 ...
SauceCode's user avatar
  • 2,325
5 votes
1 answer
12k 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&...
Akshat Vats's user avatar
0 votes
0 answers
757 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 =...
littlenoodles's user avatar
1 vote
2 answers
2k 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 ...
hexbit1's user avatar
  • 11
1 vote
1 answer
6k 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 ...
Viktor's user avatar
  • 217