diff options
author | allanjude <allanjude@FreeBSD.org> | 2017-06-15 17:43:40 +0000 |
---|---|---|
committer | allanjude <allanjude@FreeBSD.org> | 2017-06-15 17:43:40 +0000 |
commit | 4af7a05a16014f016c74f294ecda3f37bba9e3b8 (patch) | |
tree | b323bb1a2c5ed07dd85c2a755947f7d827901d30 | |
parent | 46991df369721e1c56721a358ac8dd2ddfc9d4bb (diff) | |
download | FreeBSD-src-4af7a05a16014f016c74f294ecda3f37bba9e3b8.zip FreeBSD-src-4af7a05a16014f016c74f294ecda3f37bba9e3b8.tar.gz |
MFC: r319866, r319867
top: Change the way the ZFS ARC compression ratio is calculated
remove overhead statistics, already included in other counters
Approved by: re (gjb)
-rw-r--r-- | usr.bin/top/machine.c | 8 | ||||
-rw-r--r-- | usr.bin/top/top.local.1 | 5 |
2 files changed, 4 insertions, 9 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 27cc976..5980c03 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -188,9 +188,9 @@ char *arcnames[] = { NULL }; -int carc_stats[5]; +int carc_stats[4]; char *carcnames[] = { - "K Compressed, ", "K Uncompressed, ", ":1 Ratio, ", "K Overhead", + "K Compressed, ", "K Uncompressed, ", ":1 Ratio, ", NULL }; @@ -580,11 +580,9 @@ get_system_info(struct system_info *si) if (carc_enabled) { GETSYSCTL("kstat.zfs.misc.arcstats.compressed_size", arc_stat); carc_stats[0] = arc_stat >> 10; + carc_stats[2] = arc_stat >> 10; /* For ratio */ GETSYSCTL("kstat.zfs.misc.arcstats.uncompressed_size", arc_stat); carc_stats[1] = arc_stat >> 10; - carc_stats[2] = arc_stats[0]; /* ARC Total */ - GETSYSCTL("kstat.zfs.misc.arcstats.overhead_size", arc_stat); - carc_stats[3] = arc_stat >> 10; si->carc = carc_stats; } diff --git a/usr.bin/top/top.local.1 b/usr.bin/top/top.local.1 index 0830fb9..cba2e77 100644 --- a/usr.bin/top/top.local.1 +++ b/usr.bin/top/top.local.1 @@ -65,10 +65,7 @@ bytes of memory used by ARC caches bytes of data stored in ARC caches before compression .TP .B Ratio: -ratio of uncompressed data to total ARC size -.TP -.B Overhead: -amount of overhead from ARC compression +compression ratio of data cached in the ARC .SS Swap Stats .TP .B Total: |