I've read some posts telling "we're in 2021 and we don't need manual trimming of flash devices anymore", just confused and wanted to ask here, the best place to ask&learn.
How often would you suggest doing "zpool trim zroot" under a web/sql server with tons of little files (images and so on) and lots of read/write?
I'm planning to manually trim my ZFS pool (I heard setting it auto has a bad impact on performance?), add the command "zpool trim zroot" to the crontab, just trying to find a best interval.
I got 2x512GB Samsung NVMe drives in single stripe;
Manually executed "zpool trim zroot" first time. The result;
So how often should I do this?
I frequently run scrub but never did trim. Any suggestion would be much appreciated.
Thanks!
How often would you suggest doing "zpool trim zroot" under a web/sql server with tons of little files (images and so on) and lots of read/write?
I'm planning to manually trim my ZFS pool (I heard setting it auto has a bad impact on performance?), add the command "zpool trim zroot" to the crontab, just trying to find a best interval.
I got 2x512GB Samsung NVMe drives in single stripe;
Bash:
root@mybox:~ # zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
zroot 944G 245G 699G - - 1% 25% 1.00x ONLINE -
Bash:
root@mybox:~ # gpart show
=> 40 1000215136 nvd0 GPT (477G)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 4194304 2 freebsd-swap (2.0G)
4196352 996018176 3 freebsd-zfs (475G)
1000214528 648 - free - (324K)
=> 40 1000215136 nvd1 GPT (477G)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 4194304 2 freebsd-swap (2.0G)
4196352 996018176 3 freebsd-zfs (475G)
1000214528 648 - free - (324K)
Bash:
# zpool get all | grep trim
zroot autotrim off default
Manually executed "zpool trim zroot" first time. The result;
Bash:
root@mybox:~ # zpool status -t
pool: zroot
state: ONLINE
scan: scrub repaired 0B in 00:01:00 with 0 errors on Sat Oct 23 03:02:23 2021
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
nvd0p3 ONLINE 0 0 0 (100% trimmed, completed at Mon Oct 25 18:13:55 2021)
nvd1p3 ONLINE 0 0 0 (100% trimmed, completed at Mon Oct 25 18:13:56 2021)
So how often should I do this?
I frequently run scrub but never did trim. Any suggestion would be much appreciated.
Thanks!