htop icon indicating copy to clipboard operation
htop copied to clipboard

ZFS ARC stats for Linux, FreeBSD, Darwin, & Solaris

Open overhacked opened this issue 6 years ago • 13 comments

Added a new Meter type that displays ZFS ARC stats like FreeBSD's top(1). Supported on FreeBSD, Darwin/OS X/macOS, and Linux. FreeBSD & Darwin are nearly identical. Doesn't break or affect other OSes, as it is only included in Platform_meterTypes for supported OSes. There is also a potential buffer overflow bug fix in the first commit.

overhacked avatar Jul 06 '19 05:07 overhacked

...I love it when my to-do list gets shorter on its own. Thank you!

ghost avatar Jul 19 '19 13:07 ghost

Works great on OpenIndiana 2019.04 in global and non-global zones. We will ship it via sources from @ninefathom soon. Thanks, @overhacked!

Mno-hime avatar Jul 20 '19 15:07 Mno-hime

FYI: https://github.com/hishamhm/htop/issues/937.

Mno-hime avatar Aug 20 '19 08:08 Mno-hime

Should be reasonably simple. I think visually it would need to be a different meter type. @ninefathom, will you still merge if I add another "ZFS ARC Compression" meter type?

overhacked avatar Aug 23 '19 18:08 overhacked

Sure would.

On Fri, Aug 23, 2019 at 2:29 PM Ross Williams [email protected] wrote:

Should be reasonably simple. I think visually it would need to be a different meter type. @ninefathom https://github.com/ninefathom, will you still merge if I add another "ZFS ARC Compression" meter type?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hishamhm/htop/pull/920?email_source=notifications&email_token=AANHROE67GG2XX2EEXFI6X3QGAT75A5CNFSM4H6SUYZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5A7QMI#issuecomment-524417073, or mute the thread https://github.com/notifications/unsubscribe-auth/AANHROHVX53SJHL4TTWDTO3QGAT75ANCNFSM4H6SUYZQ .

ghost avatar Aug 23 '19 18:08 ghost

Resolving CI issues…

overhacked avatar Sep 03 '19 19:09 overhacked

Tests out on FreeBSD, Linux, OmniOS, and Darwin.

overhacked avatar Sep 03 '19 20:09 overhacked

@Mno-hime release with the compressed ARC stats in the usual place, as 220-sunos_11-p3

ghost avatar Sep 03 '19 20:09 ghost

Closes #937

overhacked avatar Sep 04 '19 16:09 overhacked

does this separate the ZFS ARC size as disk cache from the rest of resident core set? As of now default settings allow the ARC to fill all unused core and this condition is impossible to tell apart in current htop: image #976 only fixes ZoL proper. this is ZoLo[SI]

despair86 avatar Feb 14 '20 12:02 despair86

@despair86, I didn't mess with the code that calculates other types of memory usage in this PR, but I agree that it is more useful to have htop report ARC as cache usage. That code already exists for the FreeBSD platform but not for any other platforms.

I could add the tweaking of reported usage for Linux and Solaris/Illumos as a part of this PR. @ninefathom, any feedback? Would you rather see those changes in a separate PR, maybe an expansion of #976?

overhacked avatar Feb 14 '20 18:02 overhacked

This is needed so badly. There are several PRs addressing this issue, We should decide which one is most useful:

#153 #920 #976 #937

Harvie avatar Aug 06 '20 06:08 Harvie

Merged here: htop-dev/htop@9a55efc

natoscott avatar Aug 20 '20 08:08 natoscott