[systemd-devel] consider dropping defrag of journals on btrfs

Chris Murphy lists at colorremedies.com
Tue Feb 9 05:13:06 UTC 2021


On Mon, Feb 8, 2021 at 7:56 AM Phillip Susi <phill at thesusis.net> wrote:
>
>
> Chris Murphy writes:
>
> >> It sounds like you are arguing that it is better to do the wrong thing
> >> on all SSDs rather than do the right thing on ones that aren't broken.
> >
> > No I'm suggesting there isn't currently a way to isolate
> > defragmentation to just HDDs.
>
> Yes, but it sounded like you were suggesting that we shouldn't even try,
> not just that it isn't 100% accurate.  Sure, some SSDs will be stupid
> and report that they are rotational, but most aren't stupid, so it's a
> good idea to disable the defragmentation on drives that report that they
> are non rotational.

So far I've seen, all USB devices report rotational. All USB flash
drives, and any SSD in an enclosure.

Maybe some way of estimating rotational based on latency standard
deviation, and stick that in sysfs, instead of trusting device
reporting. But in the meantime, the imperfect rule could be do not
defragment unless it's SCSI/SATA/SAS and it reports it's rotational.

-- 
Chris Murphy


More information about the systemd-devel mailing list