Bug 258704 - kstat.zfs.zroot.misc.iostats all zeros
Summary: kstat.zfs.zroot.misc.iostats all zeros
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-24 08:43 UTC by Michal Vanco
Modified: 2021-09-24 17:31 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Vanco 2021-09-24 08:43:23 UTC
Hi,

Why are all values under kstat.zfs.zroot.misc.iostats 0? Does this mean that trim is not working for my zroot pool? Or is it just misreported? 

# zpool status zroot
  pool: zroot
 state: ONLINE
  scan: scrub repaired 0B in 00:01:31 with 0 errors on Fri Sep 24 03:49:20 2021
config:

	NAME        STATE     READ WRITE CKSUM
	zroot       ONLINE       0     0     0
	  mirror-0  ONLINE       0     0     0
	    ada0p3  ONLINE       0     0     0
	    ada1p3  ONLINE       0     0     0

errors: No known data errors

# camcontrol identify ada0 | grep -i trim
Data Set Management (DSM/TRIM) yes
# camcontrol identify ada1 | grep -i trim
Data Set Management (DSM/TRIM) yes

# sysctl kstat.zfs.zroot.misc.iostats
kstat.zfs.zroot.misc.iostats.simple_trim_bytes_failed: 0
kstat.zfs.zroot.misc.iostats.simple_trim_extents_failed: 0
kstat.zfs.zroot.misc.iostats.simple_trim_bytes_skipped: 0
kstat.zfs.zroot.misc.iostats.simple_trim_extents_skipped: 0
kstat.zfs.zroot.misc.iostats.simple_trim_bytes_written: 0
kstat.zfs.zroot.misc.iostats.simple_trim_extents_written: 0
kstat.zfs.zroot.misc.iostats.autotrim_bytes_failed: 0
kstat.zfs.zroot.misc.iostats.autotrim_extents_failed: 0
kstat.zfs.zroot.misc.iostats.autotrim_bytes_skipped: 0
kstat.zfs.zroot.misc.iostats.autotrim_extents_skipped: 0
kstat.zfs.zroot.misc.iostats.autotrim_bytes_written: 0
kstat.zfs.zroot.misc.iostats.autotrim_extents_written: 0
kstat.zfs.zroot.misc.iostats.trim_bytes_failed: 0
kstat.zfs.zroot.misc.iostats.trim_extents_failed: 0
kstat.zfs.zroot.misc.iostats.trim_bytes_skipped: 0
kstat.zfs.zroot.misc.iostats.trim_extents_skipped: 0
kstat.zfs.zroot.misc.iostats.trim_bytes_written: 0
kstat.zfs.zroot.misc.iostats.trim_extents_written: 0

thanks
Michal
Comment 1 Yuri 2021-09-24 09:51:43 UTC
It looks like you don't have autotrim enabled (zpool get autotrim zroot) nor did you run zpool trim manually.
Comment 2 Michal Vanco 2021-09-24 17:30:53 UTC
(In reply to Yuri from comment #1)

You are right. Thanks.