Repository navigation
[ISSUE #12803]✨Build the release-image Proxy with profile-guided optimization - #12804
Merged
Merged
Conversation
Collaborator
|
🔊@mxsm 🚀Thanks for your contribution🎉! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Issue(s) This PR Fixes(Closes)
Brief Description
Release images built the Broker with PGO and BOLT but the Proxy as a plain release build. This PR trains and builds the Proxy with profile-guided optimization as well.
rocketmq-proxy/examples/grpc_send_benchmark.rs: a gRPC send load generator. Each RPC carries one message, each connection is its own client, and each keeps--inflightsends outstanding; it reports throughput and p50/p99 latency as JSON and fails when a send fails. It drives the training and can be used as a benchmark.scripts/pgo-train-proxy.sh: starts a NameServer, a Broker and an instrumented cluster-mode Proxy on loopback, creates the topics through the Broker with the client benchmark, and sends through the Proxy: synchronously, with one connection and 256 in flight, with 4 connections x 64 and with 32 connections x 4. The Proxy writes its profile when it exits after SIGTERM.docker/Dockerfile.base: a new build argumentROCKETMQ_PROXY_PGO(defaulttrue). The Proxy is now built after the Broker: an instrumented build, training in front of the final Broker,llvm-profdata merge, and the release build with the profile, each in its own target directory.ROCKETMQ_PROXY_PGO=falsekeeps the plain build..gitattributes: the new script stays LF.rocketmq-website(English and Chinese) documents the build argument and the measured effect.How Did You Test This Change?
scripts/pgo-train-proxy.shagainst a release Broker (trained in 25 s, 0 failed sends), the profile merge and the PGO build: all succeeded.cargo clippy --release -p rocketmq-proxy --example grpc_send_benchmark -- -D warningsandcargo fmt -p rocketmq-proxy -- --check: clean.🤖 Generated with Claude Code