Is it possible to manually TRIM the unused blocks (free space) for an existing APFS volume?
13
votes
2
answers
11623
views
When migrating a MacBook from HDD to SSD, I did a block-level copy using
dd
. I believe for optimal flash lifetime and performance, it would be the best to issue a TRIM for every unused block in the new filesystem to inform the SSD controller (so it won't confuse my dd
copy with a large file that occupies the entire disk).
Is it possible to TRIM the free space manually for an APFS volume on macOS (like FreeBSD's trim
or Linux's fstrim
)? I've read that on HFS+, macOS's fsck
has a TRIM pass, so TRIM can be triggered manually by running fsck -fy
in single-user mode, and one should see a "trimming unused blocks" message. But it doesn't support APFS (I tried it and I didn't see any message about TRIM).
Asked by 比尔盖子
(341 rep)
Jan 13, 2021, 01:30 AM
Last activity: Jan 13, 2021, 05:51 AM
Last activity: Jan 13, 2021, 05:51 AM