Skip to content

HDD performance is poor #375

@Davester47

Description

@Davester47

Performance of dust compared to single-threaded coreutils du on my HDD is about 2x worse. I was testing on my home directory, which according to dust has 139,000 files for a total of 711 gigabytes. The filesystem is ext4.

$ echo 1 | sudo tee /proc/sys/vm/drop_caches
$ time dust
...
711G ┌─┴ .
dust  1.00s user 3.06s system 4% cpu 1:26.04 total

And for du:

$ echo 1 | sudo tee /proc/sys/vm/drop_caches
$ time du -sh .
712G	.
du -sh .  0.29s user 1.54s system 4% cpu 45.589 total

I'm not sure what is causing the difference here, but I'm guessing it has to do with the directory traversal order used by the two programs. du uses depth-first search, whereas dust appears to be using breadth-first search through rayon. Perhaps depth first search is more effective on mechanical HDDs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions