`rc mirror` Upload Performance
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 78/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- cli, performance
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Rust
- 星标
- 159
- 派生
- 23
- 平均合并
- 7 小时 4 分钟
- 30 天内合并 PR
- 10
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rustfs/cli 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
Cannot install and update with brew可能已有人在做 @overtrue 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 68/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 55/100
维护者通常 1 天内回复
相似的 Issue
-
C-bug
难度 2/5 1-3 小时 新手友好度 78/100
rust-lang/rust-analyzer#23501 ·
维护者通常 1 天内回复
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP status可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug P2 ready for work T-security T-transport
难度 2/5 1-3 小时 新手友好度 68/100
modelcontextprotocol/rust-sdk#1339 ·
维护者通常 3 天内回复
-
French BIP39 wordlist starts with a UTF-8 BOM, so generated French mnemonics carry U+FEFF and derive a non-canonical seed可能已有人在做 @Kshot3000 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 91/100
ergoplatform/sigma-rust#976 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
[Bug]: Web chat input doesn't regain focus after a reply finishes可能已有人在做 @GaijinSystems 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
zeroclaw-labs/zeroclaw#11658 ·
维护者通常 2 天内回复