Skip to content

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
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.

3 participants