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.

As stated in sysctl article on Wikipedia

sysctl is a software utility of some Unix-like operating systems that reads and modifies the attributes of the system kernel such as its version number, maximum limits, and security settings. It is available both as a system call for compiled programs, and an administrator command for interactive use and scripting. Linux additionally exposes sysctl as a virtual file system.

Further reading

Can I configure my Linux system for more aggressive file system caching?

How to persistently control maximum system resource consumption on Mac?

disable transparent hugepages

External References

Super User's BSD Cross Reference: sysctl.7

sysctl(8) linux man page

sysctl article on Wikipedia

144 questions
163
votes
7 answers

Can I configure my Linux system for more aggressive file system caching?

I am neither concerned about RAM usage (as I've got enough) nor about losing data in case of an accidental shut-down (as my power is backed, the system is reliable and the data are not critical). But I do a lot of file processing and could use some…
Ivan
  • 17,368
  • 35
  • 93
  • 118
88
votes
5 answers

How to persistently control maximum system resource consumption on Mac?

Before Mavericks, I could use /etc/launchd.conf file to change maximum system resource consumption, for example: limit maxfiles 16384 unlimited limit maxproc 16384 unlimited It no longer works in Mavericks. What is the correct way to do it in the…
Howard
  • 5,149
  • 5
  • 30
  • 34
72
votes
11 answers

disable transparent hugepages

We are installing SAP HANA in a RAID machine. As part of the installation step, it is mentioned that, To disable the usage of transparent hugepages set the kernel settings at runtime with echo never > /sys/kernel/mm/transparent_hugepage/enabled…
Ramesh
  • 38,687
  • 43
  • 140
  • 215
68
votes
1 answer

dmesg: read kernel buffer failed: Permission denied

Since recently Debian has changed the default behavior for dmesg and I cannot use it simply from my local user. % dmesg dmesg: read kernel buffer failed: Operation not permitted Same goes for: % cat /dev/kmsg cat: /dev/kmsg:…
malat
  • 2,708
  • 4
  • 27
  • 47
66
votes
2 answers

How to set and understand fs.notify.max_user_watches

I don't understand the best way to set fs.inotify.max_user_watches with sysctl. In fact, I don't understand much of what is happening here other than the fact that I need to set the number of files that can be watched by a particular process. I…
ccalvert
  • 763
  • 1
  • 5
  • 7
46
votes
3 answers

What is the difference between "all", "default" and "eth*" in /proc/sys/net/ipv[46]/conf/?

In sysctl, the /proc/sys/net/ipv[46]/conf/ keys have the following subkeys: all, default, and a key for each network interface. For example, on a machine with a single network interface eth0, it will look like this: iserv ~ # ll…
Martin von Wittich
  • 13,857
  • 6
  • 51
  • 74
34
votes
3 answers

Finding out the values of kernel options related to sysctl.conf and sysctl.d

On my Ubuntu machine, in /etc/sysctl.conf file, I've got reverse path filtering options commented out by default like this: #net.ipv4.conf.default.rp_filter=1 #net.ipv4.conf.all.rp_filter=1 but in /etc/sysctl.d/10-network-security.conf they are…
Desmond Hume
  • 2,718
  • 5
  • 21
  • 21
33
votes
3 answers

What is the difference between ping localhost and ping 127.0.0.1?

After executing the following to disable ping replies: # sysctl net.ipv4.icmp_echo_ignore_all=1 # sysctl -p I obtain different results from pinging localhost vs. 127.0.0.1 # ping -c 3 localhost PING localhost(localhost (::1)) 56 data bytes 64 bytes…
Helio
  • 473
  • 1
  • 4
  • 13
23
votes
2 answers

Description of kernel.printk values

Between Debian 5 and 6, the default suggested value for kernel.printk in /etc/sysctl.conf was changed from kernel.printk = 4 4 1 7 to kernel.printk = 3 4 1 3. I understand that the first value corresponds to what is going to the console. What are…
Zoredache
  • 3,580
  • 7
  • 29
  • 37
13
votes
1 answer

What's the difference between setting open file limits in /etc/sysctl.conf vs /etc/security/limits.conf?

I've read two separate ways of increasing the allowed open file count (I'm attempting to modify for root, if it matters). One way is to update the settings in /etc/security/limits.conf with something like: * soft nofile …
MrDuk
  • 1,527
  • 2
  • 13
  • 27
12
votes
1 answer

How to enable user_namespaces in the kernel? (For unprivileged `unshare`.)

My Linux kernel must have been configured with user_namespaces when built, but their use is restricted after boot and has to be explicitly enabled. Which sysctl should I use? (If this was turned on, this would allow to run an isolation command like…
imz -- Ivan Zakharyaschev
  • 15,113
  • 15
  • 61
  • 123
11
votes
2 answers

/proc/sys vs /sys/modules/mod/parameter

I've been wondering for last few days how exactly does it work. We can set kernel runtimes parameters using sysctl or echo boolen 1> /proc/sys/module/exactParameter but in /sys/modules/module/parameters/parameter we can also set values. Are…
ast
  • 277
  • 3
  • 9
11
votes
2 answers

Find out sysctl default values? (without rebooting)

I have modified the value of net.core.rmem_max with sysctl, and now I would like to set it back to its default value. If I reboot, net.core.rmem_max will go back to its default value (because it is not overridden in /etc/sysctl.conf), but can I know…
Nicolas Raoul
  • 7,945
  • 14
  • 43
  • 55
11
votes
1 answer

What is the difference between all and default in kernel setting?

I want to enable reversed path filtering to prevent source ip spoofing on my server. I noticed that I have the following settings at current: net.ipv4.conf.all.rp_filter = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.lo.rp_filter =…
Question Overflow
  • 4,568
  • 19
  • 57
  • 84
10
votes
3 answers

Why is editing core_pattern restricted?

This question is associated with Where is core file with abrt-hook-cpp installed? . While I was trying to generate a core file for an intentionally-crashing program, at first core file generation seemed to be stymied by abrt-ccpp. So I tried to…
StoneThrow
  • 1,575
  • 5
  • 19
  • 41
1
2 3
9 10