FreeBSD 10 Trim for ZFS

Hi All,

I just upgraded my server from FB9 FreeBSD 9 to FB10 FreeBSD 10.0, it seems now FB FreeBSD supports ZFS trim. It seems trim is not enabled on my SSD (mirror zfs).
Code:
#sysctl vfs.zfs.trim
vfs.zfs.trim.enabled: 1
vfs.zfs.trim.txg_delay: 32
vfs.zfs.trim.timeout: 30

Code:
# sysctl -d kstat.zfs.misc.zio_trim
kstat.zfs.misc.zio_trim:
kstat.zfs.misc.zio_trim.bytes: Number of bytes successfully TRIMmed
kstat.zfs.misc.zio_trim.success: Number of successful TRIM requests
kstat.zfs.misc.zio_trim.unsupported: Number of TRIM requests that failed because TRIM is not supported
kstat.zfs.misc.zio_trim.failed: Number of TRIM requests that failed for reasons other than not supported

Code:
# sysctl -a |grep _trim
kstat.zfs.misc.zio_trim.bytes: 0
kstat.zfs.misc.zio_trim.success: 0
kstat.zfs.misc.zio_trim.unsupported: 1699
kstat.zfs.misc.zio_trim.failed: 0

How can I enable trim? And how can I force server to start trim manually?
 
TRIM is enabled by default.

Maybe your controller does not support it (see camcontrol identify your_ssd_devicename_here | grep TRIM).
 
It's also possible your SSD doesn't support TRIM. Not all of them do.
 
Back
Top