`rc mirror` Upload Performance
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 78/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust
- Bereich
- cli, performance
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 159
- Forks
- 23
- Ø Merge
- 7 Std. 4 Min.
- Gemergte PRs (30 T.)
- 10
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rustfs/cli
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag
-
Cannot install and update with brewEvtl. vergeben @overtrue hat das vor 5 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
rustfs/cli#387 · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
rustfs/cli#389 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
area::tern difficulty::easy good first issue kind::cleanup triage::ready
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
eclipse-zenoh/zenoh#2842 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
中文字符导致软件崩溃Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Y-ASLant/ElegantClipboard#172 ·
-
bug documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
SaboLabs/soroban-devkit#341 ·
Maintainer antworten meist innerhalb von 1 Tag
-
agent:sonnet-high enhancement priority: P2 ready-for-agent
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
shep-pm/shep-kelpie#652 ·
Maintainer antworten meist innerhalb von 1 Tag