Improving disk cache performance in general is more than just increasing the file system cache size unless your whole system fits in RAM in which case you should use RAM drive (tmpfs is good because it allows falling back to disk if you need the RAM in some case) for runtime storage (and perhaps an initrd script to copy system from storage to RAM drive at ...
Shell Session Limit
The limits set via ulimit only affects processes created by the current shell session.
The "soft limit" is the actual limit that is used. It could be set, as far as it's not greater than the "hard limit".
The "hard limit" could also be set, but only to a value less than the current one, and only to a value not less than the "soft ...
To make options such as this permanent you'll typically add them to the file /etc/sysctl.conf. You can see a full list of the options available using this command:
$ sysctl -a
$ sudo sysctl -a | head -5
kernel.sched_child_runs_first = 0
kernel.sched_min_granularity_ns = 6000000
kernel.sched_latency_ns = 18000000
The ping command shows the address it resolved the name to. In this case it resolved to the IPv6 localhost address, ::1. On the other hand, 127.0.0.1 is an IPv4 address, so it explicitly makes ping use IPv4.
The sysctl you used only affects IPv4 pings, so you get replies for ::1, but not for 127.0.0.1.
The address you get from resolving localhost depends ...
I've found the answer while still writing the question. I've decided to post it anyway because others may find this insightful, and then answer it myself; I hope this is not frowned upon :)
The user Philipp Matthias Hahn on the linux-kernel mailing list has figured it out at least partially:
As far as I researched for IPv4 some time ago, the "default" ...
127.0.0.1 is the default loopback of most system. A loopback address is an address used by the system to validate the network stack of the OS.
The loopback address for IPv4 could take any value in the subnet 127.0.0.0/8
The loopback address for IPv6 could take any value in the subnet ::1/128
ping any value in those range should work if your ...
Checking the value of a sysctl variable is as easy as
sysctl <variable name>
and, by the way, setting a sysctl variable is as straightforward as
sudo sysctl -w <variable name>=<value>
but changes made this way will probably hold only till the next reboot.
As to which of the config locations, /etc/sysctl.conf or /etc/sysctl.d/, takes ...
Sysctl settings are documented in Documentation/sysctl/*.txt in the kernel source tree. On Debian, install linux-doc to have the documentation in usr/share/doc/linux-doc-*/Documentation/ (most distributions have a similar package). From Documentation/sysctl/kernel.txt:
The four values in printk denote: console_loglevel,
So it was actually trivial, looking at the very last message from the bug report:
Re: Bug#842226: dmesg: read kernel buffer failed: Operation not permitted
Part of the changelog from the aforementioned kernel:
* security,printk: Enable SECURITY_DMESG_RESTRICT, preventing non-root users reading the kernel log by default (sysctl:
Firstly, I DO NOT recommend you continue using NTFS, as ntfs implemention in Linux would be performance and security trouble at any time.
There are several things you can do:
use some newer fs such as ext4 or btrfs
try to change your io scheduler, for example bfq
turn off swap
use some automatic preloader like preload
use something like systemd to preload ...
I just wanted to add to this question as I was trying to disable transparent hugepages on CentOS v6 in order to enable TokuDB for MariaDB. I added the script mentioned by @slm to /etc/rc.local and it disabled transparent hugepages. However, because of the way startup scripts work in Linux, /etc/rc.local is executed after all the services are started. ...
It seems that creating the file /etc/launchd.conf and putting your command inside it should do the trick.
If it does not work, you can probably edit or create the /etc/rc.local file and add your command inside it as there is little chance that Apple will ever delete support for limit on the command line.
I should have start with that, the ...
Debian (and hence probably Ubuntu, too) has been known to ship a kernel with such a restriction of user_namespaces, and there the way to enable it was/is:
sysctl -w kernel.unprivileged_userns_clone=1
ALT has such a restriction in kernel-image-std-def, too. ...
Entries in procfs are managed by ad hoc code. The code that would set permissions and ownership on the files under /proc/sys (proc_sys_setattr) rejects changes of permissions and ownership with EPERM. So it isn't possible to change the permissions or ownership of these files, full stop. Such changes are not implemented, so being root doesn't help.
When you ...
Localhost has two addresses, an IPv6 address ::1 and an IPv4 address 127.0.0.1.
IPv6 is the default protocol, so ::1 is always preferred over 127.0.0.1. This is why you have pinged ::1 when asking to ping localhost.
As for why you could ping ::1 but could not ping 127.0.0.1, your sysctl has only disabled pings for IPv4, but not for IPv6. As far as I can ...
On 32 bit systems:
blockdev --setra 8388607 /dev/sda
On 64 bit systems:
blockdev --setra 4294967295 /dev/sda
Write behind cache:
echo 100 > /proc/sys/vm/dirty_ratio
This will use up to 100% of your free memory as write cache.
Or you can go all out and use tmpfs. This is only relevant if you have RAM enough. Put this in /etc/fstab. ...
Changing the limits in /etc/launchd.conf or /etc/rc.local is no longer supported for the recent macOS. See: Old Systems and Technology.
Instead, you should create a new launch agent.
Here is the command example using PlistBuddy command (see: man PlistBuddy):
sudo /usr/libexec/PlistBuddy /Library/LaunchAgents/com.launchd.maxfiles.plist \
on Linux, you'd do something like
sudo sysctl -w net.ipv4.ip_local_port_range="60000 61000"
instruction for changing ephemeral port range on other unices can be found for example at http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html
The difference is the scope, and how it's applied. Open file limits set via sysctls apply to the entire system, whereas limits set via /etc/security/limits.conf apply only to things that meet the criteria specified there. The other primary difference is that /etc/security/limits.conf limits are applied via ulimit, and thus can be changed more readily, ...
I don’t think there is any such official documentation. sysctl entries are handled by procps and systemd; but neither projects’ documentation address how entries are processed within the same configuration file.
The short version is that the last entry in sysctl.conf wins, even when other files are present (in /etc/sysctl.d or elsewhere), regardless of ...
These are sysctl parameters. You can set them either by writing to /proc/sys/CATEGORY/ENTRY or by calling the sysctl command with the argumnent /proc/sys/CATEGORY/ENTRY=VALUE. These settings affect the running kernel, they are not persistent.
If you want to make these settings persistent, you need to set them at boot time. On Ubuntu, create a file in the ...
So one of the big things about learning to Unix is reading the bloody man page:
I'm not just being a get off my lawn grumpy old man, there REALLY IS valuable information in there. In this case:
sysctl is used to modify kernel parameters at runtime. The parameters available are those listed under /proc/sys/. Procfs is
sysctl -w writes kernel parameter values to the corresponding keys under /proc/sys:
sudo sysctl -w fs.inotify.max_user_watches=12288
writes 12288 to /proc/sys/fs/inotify/max_user_watches. (It’s not equivalent, it’s exactly that; interested readers can strace it to see for themselves.)
loads settings from a file, either /etc/sysctl.conf (the ...
The handler for accept_ra in net/ipv6/addrconf.c is proc_dointvec. So generic interface code has previously generated an array of all and interface-specific entries, and writing into these with sysctl or procfs just puts the value you specify in the array.
We are concerned with how those values are then used
You'll see from callers of ipv6_accept_ra() ...