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

0.8.2 ignores ARC min/max sysctls after kernel boot #9487

Closed
sempervictus opened this issue Oct 19, 2019 · 0 comments · Fixed by #9489
Closed

0.8.2 ignores ARC min/max sysctls after kernel boot #9487

sempervictus opened this issue Oct 19, 2019 · 0 comments · Fixed by #9489
Labels
Component: Memory Management kernel memory management Type: Regression Indicates a functional regression

Comments

@sempervictus
Copy link
Contributor

sempervictus commented Oct 19, 2019

System information

Type Version/Name
Arch
Current
4.14.150 (grsec and linux-hardened flavors both exhibit this problem, the latter is very close to if not identical to vanilla for our purposes)
Architecture x64
ZFS Version 0.8.2 - built into the kernel, not a module.
SPL Version N/A

Describe the problem you're observing

Sysctls for ARC min/max appear to be ignored for all cases other than kernel command line configuration. Runtime echo $((8*1024*1024*1024)) > /sys/module/zfs/parameters/zfs_arc_max does not show new value in arcstat max size, and does not shrink ARC when the initial value is bigger than the setting. Usually the initial value is bigger as it defaults to half of all system RAM, resulting in OOMs for applications over time. This problem is also present during userspace init when sysctl.d is processed.

Describe how to reproduce the problem

Attempt to set /sys/module/zfs/parameters/zfs_arc_max or /sys/module/zfs/parameters/zfs_arc_min and watch them not change.

This happens off the clean 0.8.2 tag, with the grsec 0.8.2 patch, and with all of the metaslab related commits backported from master to permit use of the range tree code on 0.8.2. In between builds, have been using git clean -dxf as suggested by @behlendorf to keep the tree clean.

Anyone else run builtin ZFS and seeing this? I imagine it would have been flagged and fixed long ago if module users were seeing it.

@loli10K loli10K added Component: Memory Management kernel memory management Type: Regression Indicates a functional regression labels Oct 20, 2019
behlendorf pushed a commit that referenced this issue Oct 26, 2019
This change leverage module_param_call() to run arc_tuning_update()
immediately after the ARC tunable has been updated as suggested in
cffa837 code review.

A simple test case is added to the ZFS Test Suite to prevent future
regressions in functionality.

Reviewed-by: Matt Macy <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #9487  
Closes #9489
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Memory Management kernel memory management Type: Regression Indicates a functional regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants