`rc mirror` Upload Performance
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- cli, performance
Hướng nghiên cứu
Start in crates/s3/src/client.rs around lines 4300-4312, then inspect the single-part and multipart upload paths and their handling of ObjectWritePrecondition. Use the reported nested-folder benchmark as the validation baseline. Done means small preconditioned files avoid unnecessary multipart requests while If-None-Match and If-Match behavior remains correct.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I recently compared the upload performance of rc mirror vs MinIO's mc mirror against a RustFS server.
Generally, rc mirror turned out to be about six times slower than mc mirror on my machine. I did some investigation and found two major causes for this:
mc mirrorseems to use stronger parallelization per default- Small files get uploaded by
mc mirroras singlePutObjectoperations, whereasrc mirroralways uses a multipart upload.
Point 2 means that for small files, rc mirror makes three requests instead of one, and accordingly triples the upload time. In the code (crates/s3/src/client.rs line 4300-4312, I found a reason for that, namely
// RustFS evaluates write preconditions for multipart completion. Keep
// ordinary small uploads on PutObject, but route conditional path writes
// through multipart so mirror retains compare-and-swap semantics on the
// currently deployed service.
if Self::should_use_multipart(file_size)
|| !matches!(precondition, ObjectWritePrecondition::None)
{
self.put_object_multipart_from_path(path, file_path, file_size, options, on_progress)
.await
} else {
self.put_object_single_part_from_path(path, file_path, file_size, options)
.await
}
So I understand that's a safeguard to ensure write preconditions are respected. However, since version 1.0.0-alpha.47 (rustfs/rustfs#409), RustFS also enforces If-None-Match/If-Match write preconditions on PutObject itself.
I would therefore suggest to drop the multipart upload route for small files with preconditions. I have already tested it (approx. 25k files in a nested folder structure, with average file size of ~25 KB), and it expectedly increases upload performance by roughly a factor of three for small files (still significantly slower than mc, though):
| Command | Number of runs | Average real time | Average user time | Average sys time |
|---|---|---|---|---|
mc mirror |
10 | 25.120s | 9.295s | 9.815s |
rc mirror |
10 | 168.318s | 12.236s | 16.648s |
rc mirror (skip multipart for small files) |
10 | 42.561s | 6.254s | 9.561s |
Are there any objections against this change? If not, I'd be happy to set up a PR.
- Ngôn ngữ chính
- Rust
- Star
- 159
- Fork
- 23
- Merge trung bình
- 7 giờ 4 phút
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rustfs/cli
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Cannot install and update with brewCó thể đã có người làm @overtrue đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
rustfs/cli#387 · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
rustfs/cli#389 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
ai-priority/P2 bug db/oracle user-priority/P1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
swc-project/swc#12516 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
app bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
mls-rs-crypto-awslc: exact aws-lc-rs =1.16.3 pin blocks rustls security updateCó thể đã có người làm @muscariello đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100