Repository navigation
chore: add a script that measures what a dedicated host needs - #1579
Merged
Merged
Conversation
Kenny asked on OpenReliant#1405 for the script behind the headless host measurements there. This is that script, made to run on Linux, macOS and Windows, with the docs pointing to it. It waits until every pilot is flying before it samples, and on Linux and macOS it shows that the pilots' keys arrived: at the end it sends each one Q and the host must count them all leaving. The first version had no such check. On Windows the keys never reached the pilots, so the guns were off in the numbers first posted on OpenReliant#1405. On Windows the script now flies fixed turns with the guns off and says so.
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.
Adds
scripts/measure-server.py, the script behind the host measurements on #1405, as you asked there, and a paragraph pointing to it under "Optional Prometheus metrics" in the configuration guide.It starts a headless host with metrics on, joins it with terminal pilots over loopback, waits until every pilot is flying, and then prints the host's CPU use, memory, step time and traffic every 10 seconds as JSON. On Linux and macOS the pilots fire and turn at random. At the end each pilot is sent Q, and the host must count them all leaving, which shows their keys arrived. On Windows the terminal client reads keys from the console, so there the pilots fly fixed turns with their guns off, and the script says so.
With 1.1.0-rc.3's Linux build, in WSL on a Ryzen 9 7950X3D, 120 s samples:
The guns-off row sends what the Windows deathmatch rows on #1405 sent (about 385 kB/s and 1,200 to 1,300 messages a second), which fits the correction there.
What is left: the macOS path reads CPU and memory with
psand is untested. It reports no peak or private memory.Refs #1405