Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow compressed writes and high CPU usage #771

Open
brauliobo opened this issue Oct 21, 2024 · 1 comment
Open

Slow compressed writes and high CPU usage #771

brauliobo opened this issue Oct 21, 2024 · 1 comment

Comments

@brauliobo
Copy link

On rsyncing a backup on slow WD 5TB external drives, I see a one-thread flush operation almost always on 100% CPU

The compression used is zstd:10 and zstd:15 for another drive.

On BTRFS, using the compression I see an eventual flush with a multi-threaded CPU use on compressed-write kthreads. It usually lasts just a few seconds instead of constant 1 core use.

Also, it seems Bcachefs isn't testing the compression and is dumbly compressing everything even if it wouldn't result in any gains. For instance, media (audio, video, and images) aren't compressible, besides the obvious already compressed files.

So a lot of CPU usage can be saved if it only compresses what can be compressed.

Using Linux 6.11.3 on Archlinux
image

@brauliobo brauliobo changed the title Slow compression writes and high CPU usage Slow compressed writes and high CPU usage Oct 21, 2024
@koverstreet
Copy link
Owner

Yeah, multithreaded compression is on the wishlist; filetype detection would be good too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants