Skip to main content

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
27 views

"@reboot" in root crontab, instead of systemctl scripts - clever solution or with many disadvantages?

I am maintaining a new application and they have no init scripts or systemctl scripts. They use crontab with content like here: # Start App2 at reboot @reboot (. /home/app2/.bash_profile; /opt/app2/...
Salinas's user avatar
  • 11
0 votes
0 answers
17 views

Using overcommit_memory = 2 crashes a Postgres container

I have a device that has Debian 11 installed, on which Docker is running.  On boot, it starts the Docker Daemon and the nine containers.  Eight of them are executing a C# program and the last one is a ...
Master DJon's user avatar
0 votes
0 answers
134 views

Why can't root edit /var/spool/cron/crontabs?

[Please, I don't want to know why I shouldn't edit it; I want to know why I can't edit it] # pwd /var/spool/cron/crontabs # ll sysadmin -rw------- 1 sysadmin crontab 210 Jun 17 16:05 sysadmin # getcap ...
QF0's user avatar
  • 315
0 votes
1 answer
82 views

What other subsystems are responsible for enabling IPv6 in when it has been disabled in sysctl.conf, and how can I track which one is enabling it?

Although I have disabled IPv6 in sysctl.conf (Debian 11), connecting my main switch to an IPv6 enabled router results in IPv6 addresses being allocated on Debian interfaces and I can ping and SSH to ...
vfclists's user avatar
  • 7,629
2 votes
1 answer
72 views

How to disable logical processors in OpenBSD?

It is well known that OpenBSD disables hyper-threading by default. However, htop shows 16 CPUs: 8 online and 8 offline, which takes extra space on the screen and is not very informative. Moreover, ...
nalzok's user avatar
  • 421
0 votes
0 answers
189 views

OOM invoked regularly by PHP-FPM

I'm using EC2 instance t4g.micro which is arm64, with 1gb ram of the latest ubuntu. I'm using nginx with PHP-FPM for upload and convert pictures using latest image.intervention with GD. My PHP_FPM ...
user24198409's user avatar
0 votes
0 answers
145 views

docker doesn't use sysctl values from host

I run a linux container on oraclelinux 9 linux host (the host itself runs in a VM). From where does docker read the sysctl params? I try change the default value of a sysctl value which docker uses. ...
Arikael's user avatar
  • 185
0 votes
1 answer
60 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
150 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
80 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
1 vote
2 answers
163 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,715
0 votes
0 answers
21 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
  • 905
0 votes
1 answer
137 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
  • 905
1 vote
0 answers
49 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 ...
Ssaf's user avatar
  • 11
1 vote
0 answers
230 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/...
None's user avatar
  • 657
2 votes
1 answer
598 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
  • 6,502
-1 votes
1 answer
576 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.5k
0 votes
1 answer
2k 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
  • 177
1 vote
1 answer
2k 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
238 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
415 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
149 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
193 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
2 votes
1 answer
6k 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
  • 135
23 votes
2 answers
9k 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
4k 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
  • 8,329
3 votes
1 answer
439 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,035
2 votes
2 answers
765 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
948 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.5k
0 votes
0 answers
1k 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
2k 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
159 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
  • 111
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
354 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
3 votes
0 answers
934 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
203 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,295
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
122 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.5k
1 vote
1 answer
488 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
  • 7,073
2 votes
1 answer
332 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
12k 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
1k 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.5k
1 vote
1 answer
773 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
257 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
8 votes
1 answer
21k 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
2k 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,119
2 votes
0 answers
132 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
  • 303
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
  • 991
2 votes
1 answer
4k 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
  • 32.3k