-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 appears to ignore zfs.zfs_arc_max in the kernel commandline #698
Comments
I'm not sure this is really a bug. Why would you expect this to work in the first place? The kernel only has a very specific set of supported command line options, these differ from module options. |
Various Gentoo developers in #gentoo-dev on freenode were quite confident that the kernel would provide default parameters to modules when added to the kernel commandline in this way. One example that they cited was "i915.i915_enable_rc6=1". I do not see anything in the ZFS code that would permit this, but Intel's ability to do this with i915 suggests that it might be possible to do this for ZFS as well. |
Interesting, well we can certainly leave the bug open until someone has time to look in to it. Right now zfs only uses the standard module option infrastructure, perhaps there's some additional handling we need to add to do this. |
I think that the The behavior seems to depend on |
Yes, this is correct, the command line module parameters are only applied for modules that are built-in. |
This issue has been fixed in genkernel 3.4.39. The commit that fixed it was the following: Other distributions should be able to do something similar in their initramfs generation software to enable this to work. |
Currently the values set for zfs_arc_min and zfs_arc_max are ignored by the kernel: ``` Unknown kernel command line parameters... will be passed to user space ``` module parameters provided on the commandline usually need to be prefixed with the modulename (e.g. zfs.zfs_arc_min, see [0] for a bit on related information (the issue itself is not related)). Paradoxically currently ZFS will print spurious warnings about settings being ignored when they are actually set - see [1]. Booting the debug image and connecting the shell on the serial console confirmed that the values did not seem to be set: `grep '^c_' /proc/spl/kstat/zfs/arcstats` showed half of the memory for c_max. [0] openzfs/zfs#698 [1] openzfs/zfs#12504 Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
The interface was changed to take a NonZeroUsize
It does not appear to be possible to set zfs_arc_max via the kernel commandline. I tried setting both zfs_arc_max and zfs.zfs_arc_max, but neither appeared to have any effect on c_max in /proc/spl/kstat/zfs/arcstats.
This was observed when booting Linux 3.3.2 with an initramfs.
The text was updated successfully, but these errors were encountered: