perf(filemeta): phase-1~3 rename_data metadata optimization (#3011)

* chore(perf): harden amd64 profiling benchmark flow

* fix(profiling): isolate bench buckets and map protobuf conflict

* perf: avoid blocking owned local writes

* style: format profile admin handler

* docs: clarify observability trace validation

* perf: reduce mkdir overhead on local writes

* perf: add rename_data meta microbenchmark

* perf(filemeta): fast-path data_dir decode in version meta

* perf(filemeta): collapse data-dir lookup into one scan

* perf(filemeta): reduce scan allocs and refresh meta bench

* perf(ecstore): skip mkdir path on read-only open

* perf(filemeta): single-pass unshared data-dir scan

* perf(filemeta): add two-key inline remove fast path

* perf(filemeta): compare remove-two keys by bytes first

* bench(ecstore): add remove_two-only micro benchmark

* bench(ecstore): stabilize rename_data meta benchmark timing

* bench(ecstore): align rename_data path with remove_two

* perf(filemeta): avoid uuid string alloc in remove_two

* perf(filemeta): add fast-path for empty inline data

* perf(filemeta): streamline add_version match branch

* perf(filemeta): fast-return remove_key on miss

* perf(filemeta): speed up add_version insertion lookup

* style(ecstore): normalize formatting in perf-tuning files

* refactor(filemeta): unify inline data removal paths
This commit is contained in:
houseme
2026-05-19 18:20:24 +08:00
committed by GitHub
parent f695870626
commit 25c6bdf490
16 changed files with 1059 additions and 177 deletions
+26
View File
@@ -11,6 +11,8 @@ ENDPOINT=""
ACCESS_KEY=""
SECRET_KEY=""
BUCKET="rustfs-bench"
AUTO_NEW_BUCKET=false
BUCKET_PREFIX="rustfs-bench"
REGION="us-east-1"
CONCURRENCY=128
DURATION="60s"
@@ -38,6 +40,8 @@ Required:
Optional:
--bucket Bucket name (default: rustfs-bench)
--auto-new-bucket Auto-generate a unique bucket for this run
--bucket-prefix Prefix used with --auto-new-bucket (default: rustfs-bench)
--region Region (default: us-east-1)
--concurrency Concurrency for all sizes (default: 128)
--duration warp duration, e.g. 60s/2m (default: 60s)
@@ -92,6 +96,8 @@ parse_args() {
--access-key) ACCESS_KEY="$2"; shift 2 ;;
--secret-key) SECRET_KEY="$2"; shift 2 ;;
--bucket) BUCKET="$2"; shift 2 ;;
--auto-new-bucket) AUTO_NEW_BUCKET=true; shift ;;
--bucket-prefix) BUCKET_PREFIX="$2"; shift 2 ;;
--region) REGION="$2"; shift 2 ;;
--concurrency) CONCURRENCY="$2"; shift 2 ;;
--duration) DURATION="$2"; shift 2 ;;
@@ -156,6 +162,15 @@ setup_output() {
echo "size,tool,concurrency,status,throughput,requests_per_sec,avg_latency,log_file" > "$SUMMARY_CSV"
}
resolve_bucket() {
if [[ "$AUTO_NEW_BUCKET" != "true" ]]; then
return
fi
local suffix
suffix="$(date +%Y%m%d%H%M%S)-$RANDOM"
BUCKET="${BUCKET_PREFIX}-${suffix}"
}
extract_value() {
local pattern="$1"
local file="$2"
@@ -238,6 +253,14 @@ run_one() {
fi
fi
if [[ "$TOOL" == "warp" ]]; then
# Warp may still exit with code 0 even when it prints runtime failures.
# Treat explicit error lines as failed runs to keep summary.csv reliable.
if rg -q 'warp: <ERROR>' "$log_file"; then
status="failed"
fi
fi
local metrics throughput reqps latency
metrics="$(collect_metrics "$log_file")"
throughput="$(echo "$metrics" | cut -d',' -f1)"
@@ -250,6 +273,7 @@ run_one() {
main() {
parse_args "$@"
validate_args
resolve_bucket
require_cmd rg
if [[ "$TOOL" == "warp" ]]; then
require_cmd "$WARP_BIN"
@@ -261,8 +285,10 @@ main() {
echo "Output dir: $OUT_DIR"
echo "Tool: $TOOL"
echo "Bucket: $BUCKET"
echo "Sizes: $SIZES"
echo "Concurrency: $CONCURRENCY"
echo "$BUCKET" > "$OUT_DIR/bucket.txt"
IFS=',' read -r -a size_arr <<< "$SIZES"
for raw_size in "${size_arr[@]}"; do