Categories
FreeBSD

ZFS Trim

I noticed today that the FreeBSD ZFS pool that I created on my laptop SSD was not configured for TRIM. TRIM enables the SSD to recover space from previously written to blocks that have since had files deleted. This can help maintain performance of the SSD as it fills with data.

My pool is called zroot, so the command to check the value of the TRIM setting is:

$ zpool get autotrim zroot

The command to switch on automatic TRIM is:

$ zpool set autotrim=on zroot

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.