perf(storage): add write_object upload strategies benchmarking suite - #6611
Conversation
…appendable_object
There was a problem hiding this comment.
Code Review
This pull request introduces a new benchmark suite, storage-benchmark-write-object, to compare GCS write_object upload strategies and checksum modes. Feedback on the implementation highlights two style guide violations in source.rs: the use of blocking std::fs::create_dir_all within an asynchronous function, and the absence of required // SAFETY: comments on unsafe blocks.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6611 +/- ##
==========================================
+ Coverage 97.01% 97.03% +0.01%
==========================================
Files 326 326
Lines 107548 107548
==========================================
+ Hits 104342 104356 +14
+ Misses 3206 3192 -14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This is part of the Issue #6461 , a benchmarking effort that is helping the final API definition decision. For an 8GB file sit on disk,
The executive decision is to turn on Option B to prioritize data integrity over speed; Option B incurs less performance penalty than Option C. |
vsharonlynn
left a comment
There was a problem hiding this comment.
Approved. With a nit. Thank you!
Summary
Adds an independent benchmarking suite crate
storage-benchmark-write-objectundersrc/storage/benchmarks/write_objectto evaluate and compare different upload strategies and checksum validation mechanisms forwrite_object.This benchmarking suite provides empirical performance and throughput data across various payload sizes to inform the decision on the default
write_objectbehavior for seekable sources (e.g., local files).Scenarios Evaluated
Option_A_Unbuffered_Baseline):.send_unbuffered()Option_B_Unbuffered_2Pass):.precompute_checksums().await?.send_unbuffered()x-goog-hashserver-side validation header.Option_C_Buffered_Chunked):.send_buffered()Benchmark Features
GOOGLE_CLOUD_RUST_BENCHMARKS_STATS_OUTPUT_PATH.run_all.shdriver script to run all 5 tiers sequentially.Testing
cargo clippy --all-targets -- -D warnings, andcargo fmt.