Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch: vm.max_map_count tweak superceded by config in filesystem-2024.04.07-1 or newer #919

Open
thojohns opened this issue Apr 10, 2024 · 2 comments

Comments

@thojohns
Copy link

As of April 7, 2024, Arch Linux has set its default value for vm.max_map_count to 1048576 (source). This is higher than the previous default value of 65530 but lower than linux-tkg's default of 16777216. However, Arch's method of enforcing this value - updating /usr/lib/sysctl.d/10-arch.conf in the core filesystem package to include the line vm.max_map_count=1048576 - overrides any kernel-specific settings, unless a higher-priority config file sets it to another value.

The 'proper' solution would be to create that higher priority config file - create something like /usr/local/lib/sysctl.d/99-vm-max-map-count with the line vm.max_map_count=16777216. This is outside the scope of a kernel-only package (especially with the example /usr/local path), and probably useless for non-Arch distros, but it might be worth noting somewhere in the documentation anyways. I'm also uncertain if other distros that change the default vm_max_map_count value need similar overrides or not as I have no experience with most of them.

@ryanmusante
Copy link

Will a sysctl.conf in /etc with this entry still take precedence?

@thojohns
Copy link
Author

thojohns commented Apr 10, 2024

Will a sysctl.conf in /etc with this entry still take precedence?

sysctl.conf isn't even read from, at least on systemd-based Arch systems, and that appears to have been the case for the last decade; I can't really test on a non-systemd setup.

The Arch wiki recommends migrating /etc/sysctl.conf to /etc/sysctl.d/99-sysctl.conf, and I can at least confirm that dropping the example conf above into /etc/sysctl.d/ also works - putting personal configs in /usr/local/ is just a personal preference of mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants