-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
zfs_arc_max init option silently ignored if value is less than default arc_c_min #10157
Comments
I've validated on a machine with 256GB of ram. I can't set max_arc below (roughly) 8589934592. e.g. 8443623040 causes it to be ignored and set to 135097968640. In my case I'd prefer only 5GB of RAM to be consumed since this isn't a fileserver... |
I have just been looking in this area. I'll see what I can do. |
Fixes openzfs#10157 Set arc_c_min before arc_c_max so that when zfs_arc_min is set lower than the default allmem/32 zfs_arc_max can also be set lower. Add warning messages when tunables are being ignored. Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Fixes openzfs#10157 Set arc_c_min before arc_c_max so that when zfs_arc_min is set lower than the default allmem/32 zfs_arc_max can also be set lower. Add warning messages when tunables are being ignored. Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Fixes openzfs#10157 Set arc_c_min before arc_c_max so that when zfs_arc_min is set lower than the default allmem/32 zfs_arc_max can also be set lower. Add warning messages when tunables are being ignored. Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Fixes openzfs#10157 Set arc_c_min before arc_c_max so that when zfs_arc_min is set lower than the default allmem/32 zfs_arc_max can also be set lower. Add warning messages when tunables are being ignored. Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Fixes openzfs#10157 Set arc_c_min before arc_c_max so that when zfs_arc_min is set lower than the default allmem/32 zfs_arc_max can also be set lower. Add warning messages when tunables are being ignored. Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Fixes openzfs#10157 Set arc_c_min before arc_c_max so that when zfs_arc_min is set lower than the default allmem/32 zfs_arc_max can also be set lower. Add warning messages when tunables are being ignored. Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Fixes openzfs#10157 Set arc_c_min before arc_c_max so that when zfs_arc_min is set lower than the default allmem/32 zfs_arc_max can also be set lower. Add warning messages when tunables are being ignored. Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Set arc_c_min before arc_c_max so that when zfs_arc_min is set lower than the default allmem/32 zfs_arc_max can also be set lower. Add warning messages when tunables are being ignored. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10157 Closes #10158
(Daft question) - did this make it into any shipping releases? I've just upgraded to 2.0 and I'm still seeing 'WARNING: ignoring tunable zfs_arc_max (using 135095138304 instead)' on boot. If there is a simple way to check what release a particular change went into, happy to be pointed at it to learn how to check myself in future. |
Yes it is in the 2.0.0 release. The operative word here was "silently." The warning message you're seeing is part of what's new. Do you have The simple way to see what release a change went into is to find the commit on GitHub and look at the bottom of the box at the top of the page: 36a6e23 |
Thanks; that helps. But, it looks like:
Should I create a new issue? Details below. My original modprobe.d/zfs.conf
After rebooting
It's unclear why I'm getting the same arc_min warning twice. Now if I try to go lower, e.g. 7GB and reboot, with no arc_min set.
I'm guessing that the default of arc_min is being calculated higher than arc_max, but the warning doesn't say_why_ arc_max is being ignored. The docs for arc_min say that the default is 0, so it shouldn't be blocking arc_max, but it is. Re-checking the documentation https://openzfs.github.io/openzfs-docs/man/5/zfs-module-parameters.5.html I see that it's saying I can set arc_min to 32MB and arc_max to 64MB, so:
Looking at arc_summary, I see:
It does look like it's applied, though not sure why it's popping out a WARNING.
That also worked. Changing zfs_arc_min to just below arc_max doesn't work? The arc_min size appears to be set, but I don't know if that's just a lucky coincidence.
|
The Linux kernel sets each tunable one at a time. One tunable can affect multiple settings in ZFS internally, so there is one procedure that updates all the ARC tunables whenever one changes. The first warning comes from the update procedure running for The logic at play can be found here: Lines 7216 to 7240 in dcbf847
It's not apparent to me why This area could certainly be made more flexible and user friendly. |
Set arc_c_min before arc_c_max so that when zfs_arc_min is set lower than the default allmem/32 zfs_arc_max can also be set lower. Add warning messages when tunables are being ignored. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes openzfs#10157 Closes openzfs#10158
System information
Attempting to set
zfs_arc_max
(in the module initialization options) to less than 1/32 of total RAM will always silently fail.This appears to be due to the following check that it's less than
arc_c_min
:zfs/module/zfs/arc.c
Line 7572 in 9bb3d57
The default value of
arc_c_min
is 1/32 of total RAM:zfs/module/zfs/arc.c
Line 7820 in 9bb3d57
It's not sufficient to also set
zfs_arc_min
to a lower value in the module initialization options, because the value ofzfs_arc_min
is handled afterzfs_arc_max
, by which timezfs_arc_max
has already been ignored.As well as fixing the issue, it would be good to improve the logging in
arc_tuning_update()
in general, rather than silently ignoring parameters set by the user.The text was updated successfully, but these errors were encountered: