Skip to content

Update mtscomp.py #17

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update mtscomp.py #17

wants to merge 1 commit into from

Conversation

oliche
Copy link
Member

@oliche oliche commented Mar 18, 2025

Defaults the maximum number of threads to 4.

On some servers, mtscomp hogs all of the disk bandwidth and it is not clear that having that many concurrent threads helps !

Defaults the maximum number of threads to 4.
@oliche oliche requested a review from rossant March 18, 2025 10:47
@@ -53,7 +53,7 @@
comp_level=-1, # zlib compression level
do_spatial_diff=False, # benchmarks seem to show no compression performance benefits
do_time_diff=True,
n_threads=mp.cpu_count(),
n_threads=min(mp.cpu_count() - 1, 4), # this is I/O bound, 4 threads max is plenty on large CPUs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a max(0, ...) in the (incredible) case where there is only 1 CPU?

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

Successfully merging this pull request may close these issues.

2 participants