-
Notifications
You must be signed in to change notification settings - Fork 625
mirror and cp support set the maximum number of threads #5220
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
klauspost
reviewed
Jun 25, 2025
Contributor
klauspost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't decide if it should be hidden. I will leave that to others.
klauspost
approved these changes
Jun 26, 2025
Contributor
klauspost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. @ others - should the option be hidden?
harshavardhana
approved these changes
Jul 2, 2025
dormanze
added a commit
to dormanze/mc
that referenced
this pull request
Jul 14, 2025
* 'ping' of https://github.com/dormanze/mc: (44 commits) mv:support set tag and checksum (minio#5133) ping: support ping a specified node and remove duplicate port printing (minio#5132) feat: add `--storage-class` option to `mc put` subcommand (minio#5228) mirror and cp support set the maximum number of threads (minio#5220) Some paths like url2Stat will send resource with backslashes on windows (minio#5226) Include ARN in "replicate list" output (minio#5215) Update build version (minio#5218) fix: add checks for nil HTTP in admin-trace matches func (minio#5216) remove fips 'mc' container Dockerfile Fix deletion of previously sync'd buckets and objects during mc-mirror (minio#5205) Add STATUS column to batch job list table output (minio#5202) fix: remove check if lock config exists before set (minio#5203) removing config cmd (minio#5201) fix: support chained mirror properly for delete propagation minio#4558 (minio#5197) Change support profile defaults (minio#5198) Explicitly set file permissions for admin-cluster-{bucket,iam}-export… (minio#5194) Add support for catalog batch job type (minio#5150) Add `idp openid accesskey` commands (minio#5182) feat: add deletemarker info for batch status (minio#5191) mirror: skip status message from excluded buckets (minio#5190) ...
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.
Description
When we execute mc mirror, it often affects the minio server container. Since our mc running node has many CPU resources, 128 threads are executed by default. At this time, it will have a great impact on the minio server container, occupying a large amount of CPU resources of the minio server container, affecting other normal businesses.
Motivation and Context
We hope that mc will support specifying the maximum number of concurrent threads when executing cp or mirror to prevent excessive resource consumption of the minio server container.
How to test this PR?
mc mirror local/test ./ --max-workers 1



test result:
When the maximum number of threads is not specified, the CPU usage of the MinIO container:
CPU usage of the Minio container when the maximum number of threads is specified:
Types of changes
Checklist:
commit-idorPR #here)