ZFS Enable Trim on ZFS, a nightmare?

Hi All,

I'm not sure that should create a new thread or just follow up on below thread. But I think forum is for storage. So maybe it's better to start a new thread here.

The problem I got is that after enable Trim for ZFS, the Trim is almost kill the system. Trim is almost taking up all disk IO and there is no way to stop it except disable it in loader.conf.

You can refer to below thread for more information (I changed the driver for raid card from mfi to mrsas. With mrsas, trim is supported.)

https://forums.freebsd.org/threads/56243/


With the new mrsas, if I enable Trim and run gstat, almost all the time the disk IO is >90%. And all applications are waiting for ZFS (Trim).

And if I disable Trim, then everything is back to normal. And disk IO is <10%.

It seems Trim for ZFS has a signification impact on the disk performance.

Is that a bug or lack of feature?


Thanks
 
Last edited by a moderator:
Depending on your device, controller and the corresponding drivers the initial TRIM of a new ZFS pool is expected to be slow. Afterward TRIM shouldn't improve longterm performance without significant overhead. Some disk drivers lack TRIM coalescing e.g. nvd. One those TRIM can have a noticeable overhead and you might want to disable it.
 
Back
Top