forked from minio/minio
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Performance: Optimize speed and disk usage of backgroudAppend() for load balanced NAS cases #11
Labels
Comments
Distributed locking might help us here. These links might help us with implementing something like this using etcd: |
7 tasks
7 tasks
7 tasks
Will also be solved by #19 . |
rluetzner
pushed a commit
that referenced
this issue
Apr 20, 2022
- Also simplify helper function to cleanup transitioned objects on expiry or when they are 'overwritten' - Use expireTransitionedObjects in delete-object, multi-delete-objects and put-object API handlers
#19 should improve the situation. |
We decided to revert this change for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current Behavior
We've observed that CompleteMultipartUpload requests can potentially take long to complete and waste a lot of disk space when the uploads are done in a distributed load balanced setup.
This is because every MinIO instance involved in the multipart upload (i.e. any instance receiving a PutObjectPart request) will start fs-v1-multipart.go --> backgroundAppend() as a go routine. Every instance generates a unique file for this, so other instances cannot benefit from this optimization. Additionally only the MinIO instance that receives the CompleteMultipartUpload request will move it's aggregated temp file to the final location. All other temp files remain in .minio.sys/tmp until the cleanup process removes them (24h later).
Expected Behavior
When multiple MinIO instances are serving a NAS backend in a load balanced setup, the CompleteMultipartUpload should finish as quickly as possible or at least with a semi-consistent behavior / time taken.
Possible Solution
We will need some kind of cluster-aware backgroundAppend() logic that works for gateway nas and nasxl cases. Maybe etcd can be used to elect a leader or otherwise negotiate the process.
Steps to Reproduce (for bugs)
At least the wasted disk space can also be observed when serving the same local directory with multiple MinIO instances.
Context
We're wasting disk space and completing multipart uploads often take long to complete, depending on which MinIO instance is hit with the CompleteMultipartUpload request.
Regression
Is this issue a regression? No. This issue is also present in the official MinIO code, but they decided not to fix it: minio#13270
The text was updated successfully, but these errors were encountered: