hubcio opened a new pull request, #4765: URL: https://github.com/apache/iggy/pull/4765
A profile-guided iggy-server needs a training load against the instrumented binary and a SIGTERM exit, because a SIGKILL drops the profile. cargo-pgo owns instrument, merge and optimize, but it cannot drive a server workload. scripts/pgo.sh wraps cargo-pgo for PGO and, with --bolt, stacked BOLT. Each training run starts one server and runs pinned-producer, pinned-consumer and balanced-producer-and-consumer-group over TCP. Other transports, cluster replication, persisted durability and startup recovery get no profile, and --help says so. Every server build gets -Ctarget-cpu (native unless --target-cpu is given), so the binary is not portable. Every cargo build passes --locked, as the release builds do. Preflight refuses rustc below 1.100 and older betas or nightlies, because they miscompile the PGO counters (rust-lang/rust#163616). It refuses RUSTFLAGS and CARGO_ENCODED_RUSTFLAGS, which make cargo drop the target CPU flag, and LLVM_PROFILE_FILE, which moves the profile away from cargo-pgo. Preflight and each training refuse busy listener ports, because the benches must reach the training server. The training server keeps its data in local_data_pgo, passed as IGGY_PATH, so a .env file or IGGY_CONFIG_PATH cannot move it, and the script never deletes the local_data of a developer server. After SIGTERM the script waits for the server exit with no deadline of its own, because the server bounds its shutdown with its sharding timeouts. A training fails unless the server exits with status 0, because cargo pgo bolt optimize accepts a cut profile. The build also stops when BOLT training wrote no profile, and on Ctrl-C during training, because iggy-bench exits 0 and leaves a partial profile. cleanup_server_state in scripts/utils.sh takes an optional data directory for the training data. start_plain_server now quotes the binary path, because the cargo target dir that pgo.sh passes can contain spaces. This closes #200 - iggy is NOT facilitating binary delivery. We just give our users a way to produce an optimized server binary. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
