
The question relates to resolving slow writes on SSDs in a Linux system. The correct answer is:
A. Run the corresponding command to trim the SSD drives.
Explanation:
- SSDs use a feature called TRIM to inform the drive which blocks of data are no longer in use and can be erased. Without regular TRIM operations, write performance can degrade over time because the SSD has to handle more data during writes.
- Running the TRIM command (
fstrim) will optimize the SSD by cleaning up unused blocks, improving write speeds.
Why not the other options?
- B. Use fsck on the filesystem:
- While
fsckchecks the filesystem for errors, it does not improve write performance. It’s more relevant for detecting and repairing filesystem corruption. - C. Migrate to high-density SSDs:
- Migrating to a higher-capacity SSD won’t directly solve write speed degradation caused by lack of TRIM.
- D. Reduce the number of files:
- Reducing the number of files might help slightly in certain scenarios (like directory lookups), but it doesn’t address the root cause of degraded write performance on SSDs.
To implement TRIM, you can run:
sudo fstrim -v /
This command will trim the unused blocks on the root filesystem.