-
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
l2arc_feed is constantly writing to the cache device #11522
Comments
I see similar writes to cache device, zfs 2.0.[01]. In my case zfs iostat reports 510 bytes written consistently every second interleaved into l2arc devices in two pool. Linux iostat confirms the writes actually happening. |
I see what you mean. It may be because the header of the L2ARC device is updated constantly each time l2arc_write_buffers() runs, independently of whether we actually write buffers to L2ARC. This is by design because we need to keep track of the evict hand on the device, in case the user activates or uses trimming of L2ARC devices. Let me try with a conditional checking if the evict hand has been updated in the header and update the device header only in this case. |
I can confirm updating the header is the cause of this behavior. The linked PR resolves it. |
If we do not write any buffers to the cache device and the evict hand has not advanced do not update the cache device header. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Amanakis <[email protected]> Closes #11522 Closes #11537
If we do not write any buffers to the cache device and the evict hand has not advanced do not update the cache device header. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Amanakis <[email protected]> Closes #11522 Closes #11537
If we do not write any buffers to the cache device and the evict hand has not advanced do not update the cache device header. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Amanakis <[email protected]> Closes openzfs#11522 Closes openzfs#11537
If we do not write any buffers to the cache device and the evict hand has not advanced do not update the cache device header. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Amanakis <[email protected]> Closes openzfs#11522 Closes openzfs#11537
System information
Describe the problem you're observing
I'm seeing a behavior that I didn't notice until I rebooted for a kernel update. I switched between 5.4 to the 5.10 branch and updated to the latest ZFS HEAD: fd95af8
The cache device in my pool was being written to once per second at a single page: 4k. I booted up a VM and recreated this by just creating a new pool with a cache and observing it write once per second as well.
I dug through the commits from the build I was running from early March 2020, to the build I upgraded from at September 2020 and then to today, 2021-01-25, as they pertained to moudle/zfs/arc.c. I ripped out several commits that were parts of larger efforts, but was unable to get the constant writing to stop. From my test VM, the pool is created and then I immediately watch "zpool iostat" and have used other tools like iotop and iostat which confirm there is indeed a write occurring every second.
I'm sure this is undesirable behavior, if not a bug.
Describe how to reproduce the problem
NOTE: the a.raw, etc, are off by one due to the VM having a root volume for the archlinux install, so the raw files map to vdb+.
The writes are occurring once every second, indefinitely. I tried this on my older kernel, 5.4.63, and the behavior is identical.
Include any warning/errors/backtraces from the system logs
None. This isn't a crash but instead runtime behavior.
The text was updated successfully, but these errors were encountered: