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

arcstat l2_misses can be very incorrect #10913

Closed
adamdmoss opened this issue Sep 10, 2020 · 6 comments
Closed

arcstat l2_misses can be very incorrect #10913

adamdmoss opened this issue Sep 10, 2020 · 6 comments
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@adamdmoss
Copy link
Contributor

adamdmoss commented Sep 10, 2020

System information

Type Version/Name
Distribution Name Ubuntu
Distribution Version 18.04.05
Linux Kernel Linux version 5.4.0-42-generic (buildd@lgw01-amd64-023) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu118.04)) #4618.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020
Architecture x86_64
ZFS Version git zfs-2.0-release @ 29bc31f
SPL Version git zfs-2.0-release @ 29bc31f

Describe the problem you're observing

I was wondering why my L2 hit ratio always seemed so low, so finally decided to look into it...

The way that arc_read() currently accounts L2 hits/misses, if ANY pool has an l2arc then ALL reads that don't hit an l2arc are considered to be a miss, even if the read is from a pool that doesn't have an l2arc configured.

edit: The same over-eager miss accounting appears to also happen for reads from datasets which have secondarycache=none but whose pools have l2arc; this shouldn't count as a miss.

Describe how to reproduce the problem

Set up two pools on the same system, one backed by an l2arc and one not. Read data from the pool which doesn't have an l2arc; these reads cause l2_misses to rise (i.e. in /proc/spl/kstat/zfs/arcstats)

Include any warning/errors/backtraces from the system logs

n/a

@adamdmoss adamdmoss added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Sep 10, 2020
@adamdmoss
Copy link
Contributor Author

Pinging @gamanakis just 'cos they're an L2ARC expert at this point. :)

adamdmoss added a commit to adamdmoss/zfs that referenced this issue Sep 10, 2020
…ts shouldn't count at l2arc misses.

Signed-off-by: Adam Moss <c@yotes.com>
adamdmoss added a commit to adamdmoss/zfs that referenced this issue Sep 10, 2020
…ts shouldn't count as l2arc misses.

Signed-off-by: Adam Moss <c@yotes.com>
adamdmoss added a commit to adamdmoss/zfs that referenced this issue Sep 11, 2020
…c misses.

The other half of the fix for openzfs#10913

Signed-off-by: Adam Moss <c@yotes.com>
adamdmoss added a commit to adamdmoss/zfs that referenced this issue Sep 12, 2020
The other half of the fix for openzfs#10913

Signed-off-by: Adam Moss <c@yotes.com>
adamdmoss added a commit to adamdmoss/zfs that referenced this issue Sep 12, 2020
The other half of the fix for openzfs#10913

Signed-off-by: Adam Moss <c@yotes.com>
@PrivatePuffin

This comment has been minimized.

@adamdmoss
Copy link
Contributor Author

ZFS version should be:
2.0.0 RC1 (just to be clear this isn't release, in the future)

It's the name of the upstream branch I was using - I'm not making any claims about its naming accuracy. :)

@PrivatePuffin

This comment has been minimized.

@adamdmoss
Copy link
Contributor Author

I gave the commit id - 29bc31f

@PrivatePuffin

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

3 participants