TRIM takes ages to complete.

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,428
After some code reading, it looks to me that ZFS on Linux, unlike other platforms, issues TRIM requests to Linux block layer synchronously, blocking the TRIM taskqueue threads (which there are only 4 per pool) during execution, and also holding vdev lock, preventing other I/Os issue to the vdev. Unless I hugely misunderstood something, I'd personally call it a disaster. It is an upstream ZFS issue, but I'll continue working on it. Unfortunately it is not something that can be improved by tuning, since even the number of the TRIM taskqueues is hardcoded and would require rebuild, not mentioning it would not fix all the problems.
 
Top