Skip to content

fix(storage): stabilize benchmark ALTS handshakes and static IRQ affinity - #18638

Draft
shradhakatyal wants to merge 1 commit into
googleapis:mainfrom
shradhakatyal:fix/benchmark-read-throughput
Draft

shradhakatyal wants to merge 1 commit into
googleapis:mainfrom
shradhakatyal:fix/benchmark-read-throughput

Conversation

@shradhakatyal

@shradhakatyal shradhakatyal commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

In benchmarks-cloudbuild.yaml, the standing benchmark VM (gcs-benchmark-runner-us-west4-a) is cold-started immediately before executing run_benchmark_tests.sh with 48 concurrent worker processes (PROCESSES=48). Two cold-start effects reduce the 3-round average read throughput:

  1. ALTS Metadata Server Handshake Storm: By default in gRPC, GRPC_ALTS_MAX_CONCURRENT_HANDSHAKES is 100 per process (48 * 100 = 4,800 potential concurrent streams). When all 48 processes simultaneously initiate DirectPath ALTS handshakes against the local GCE metadata server (169.254.169.254:8080, ~100 stream buffer limit), the metadata server drops streams with UNAVAILABLE: GOAWAY received; Error code: 11; Debug Text: Buffers full {http2_error:11}, stalling Round 1 from 35.3s (5s warmup + 30s measurement) to 41.5s–49.0s.
  2. Dynamic IRQ Migration on Cold Boot: When _worker_init() initializes the 48-worker pool, it reads /proc/irq/*/smp_affinity_list once via get_irq_affinity() and pins workers to non-IRQ vCPUs. On a freshly booted VM, the continuous background irqbalance daemon dynamically migrates gVNIC interrupt queues every 10 seconds as traffic ramps up, colliding with pinned worker vCPUs.

Change

  • Configure and export GRPC_ALTS_MAX_CONCURRENT_HANDSHAKES="${GRPC_ALTS_MAX_CONCURRENT_HANDSHAKES:-2}" in packages/google-cloud-storage/cloudbuild/run_benchmark_tests.sh so 48 worker processes never exceed 96 concurrent ALTS handshakes against the local metadata server while still handshaking multiple DirectPath subchannels concurrently.
  • Stop the continuous background irqbalance daemon and execute a single one-shot pass (sudo irqbalance --oneshot) before starting pytest.

@shradhakatyal

Copy link
Copy Markdown
Contributor Author

/gcbrun (512d4e7)

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances the GCS DirectPath read benchmark by adding median and maximum throughput columns to the results display, and optimizing the benchmark execution script. Key script improvements include limiting concurrent ALTS handshakes, preferring modern Python versions (3.11/3.12), pre-compiling bytecode, and pre-warming gRPC channels. Feedback on these changes highlights alignment issues in the output table borders, potential type conversion errors when parsing throughput values, risks of bypassing dependency resolution with --no-deps during pip installation, and the suppression of stderr during the pre-warming step which hinders debugging.

@shradhakatyal

Copy link
Copy Markdown
Contributor Author

/gcbrun (7d52fce)

@shradhakatyal

Copy link
Copy Markdown
Contributor Author

/gcbrun (d78d379)

@shradhakatyal

Copy link
Copy Markdown
Contributor Author

/gcbrun (2701e2e)

@shradhakatyal
shradhakatyal force-pushed the fix/benchmark-read-throughput branch from 2701e2e to 0137b2e Compare October 14, 2026 10:14
@shradhakatyal shradhakatyal changed the title perf(storage): throttle ALTS handshakes and pre-warm DirectPath in benchmark runner fix(storage): set GRPC_ALTS_MAX_CONCURRENT_HANDSHAKES=2 in benchmark runner Oct 14, 2026
@googleapis googleapis deleted a comment from gemini-code-assist Bot Oct 14, 2026
@googleapis googleapis deleted a comment from gemini-code-assist Bot Oct 14, 2026
@googleapis googleapis deleted a comment from gemini-code-assist Bot Oct 14, 2026
@googleapis googleapis deleted a comment from gemini-code-assist Bot Oct 14, 2026
@googleapis googleapis deleted a comment from gemini-code-assist Bot Oct 14, 2026
@shradhakatyal

Copy link
Copy Markdown
Contributor Author

/gcbrun (0137b2e)

@shradhakatyal
shradhakatyal force-pushed the fix/benchmark-read-throughput branch from 0137b2e to 5cf9e92 Compare October 14, 2026 11:18
@shradhakatyal

Copy link
Copy Markdown
Contributor Author

/gcbrun 5cf9e92

@shradhakatyal
shradhakatyal force-pushed the fix/benchmark-read-throughput branch from 5cf9e92 to 00ff4d5 Compare October 14, 2026 13:42
@shradhakatyal shradhakatyal changed the title fix(storage): set GRPC_ALTS_MAX_CONCURRENT_HANDSHAKES=2 in benchmark runner fix(storage): stabilize benchmark ALTS handshakes and static IRQ affinity Oct 14, 2026
@shradhakatyal

Copy link
Copy Markdown
Contributor Author

/gcbrun (00ff4d5)

@shradhakatyal
shradhakatyal force-pushed the fix/benchmark-read-throughput branch from 00ff4d5 to 28bd981 Compare October 14, 2026 13:55
@shradhakatyal

Copy link
Copy Markdown
Contributor Author

/gcbrun (28bd981)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant