Skip to content

arc_summary shows negative value for MFU data target #17210

Closed
@shodanshok

Description

@shodanshok

System information

Type Version/Name
Distribution Name Rocky Linux
Distribution Version 9.5
Kernel Version 5.14.0-503.16.1.el9_5.x86_64
Architecture x86_64
OpenZFS Version 2.2.7-1

Describe the problem you're observing

arc_summary shows negative value for MFU data target:

ARC size (current):                                    99.5 %   15.3 GiB
        Target size (adaptive):                       100.0 %   15.4 GiB
        Min size (hard limit):                          6.2 %  984.0 MiB
        Max size (high water):                           16:1   15.4 GiB
        Anonymous data size:                            0.0 %    0 Bytes
        Anonymous metadata size:                      < 0.1 %  768.0 KiB
        MFU data target:                     -77.6 %  -10898862366 Bytes
        MFU data size:                                  0.2 %   30.5 MiB

Poking inside arc_summary itself, I can see the following lines:

zfs/cmd/arc_summary

Lines 626 to 627 in 7be9fa2

s = 4294967296
v = (s-int(pd))*(s-int(meta))/s

As on this machine pd is currently equal to 20883106811, v becomes negative.

Describe how to reproduce the problem

Not sure. It seems related to prefetch, but what does s means in this context? ARC states balance, related to the fixed-point arithmetic. From my understanding, pd or pm should never be bigger than 4294967296

Include any warning/errors/backtraces from the system logs

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions