Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loadgen runner #12

Merged
merged 34 commits into from
Aug 17, 2021
Merged

Loadgen runner #12

merged 34 commits into from
Aug 17, 2021

Conversation

mhofman
Copy link
Member

@mhofman mhofman commented Jul 23, 2021

Summary

This (large) PR introduces a runner capable of orchestrating a chain node, a client ag-solo and the existing loadgen script, as well as several wrapper scripts to automate running the loadgen using any SDK revision, in the expected environment.

It's the base for running a daily loadgen on the latest agoric-sdk to capture historical performance data. See Agoric/agoric-sdk#2630

The orchestrator starts a local chain node (or monitor node in the case of an remote chain), pipes and parses the slog using a FIFO file, and monitors events from the slog. At regular interval, it captures process information for the CPU usage of the chain process and its vat subprocesses, as well as the disk storage used by the chain. It can run multiple cycles of chain, client and loadgen, compressing and saving the chain storage and raw slog for every stage.

Runner structure

The runner is setup as a node workspace package. Unlike the loadgen package, it doesn't depend on agoric-sdk. Since it tries to follow code patterns, it runs under SES using its own install-ses and uses a fork of promise-kit, mainly to avoid breaking changes such as RESM->NESM.

The runner is a CLI application composed of a main.js file parsing the command line and implementing the bulk of the orchestration logic. It relies on tasks that implement the specifics of setting up and running a chain node, running a local solo client, and running the load generator itself, all spawned as sub processes. Currently it supports running these tasks for a local chain, or against an external stage and testnet chain. The implementation uses a bunch of potentially reusable async, stream, process and filesystem helpers (currently not covered by any unit tests).

The output of all spawned sub processes is combined and prefixed into the stdout of the runner.

@mhofman mhofman requested review from warner, dckc and michaelfig July 23, 2021 18:03
mhofman added 2 commits July 24, 2021 03:40
The perf script would ignore directed signals while sleeping or waiting
for docker, launch those in the background instead and wait on them.
Send a term signal to docker instead of stopping to prevent abrupt kill
Streamline signal handling logic
@mhofman mhofman force-pushed the mhofman/3107-perf-runner branch from bdb6aa4 to c0f1db6 Compare July 24, 2021 04:15
Copy link
Member

@warner warner left a comment

Choose a reason for hiding this comment

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

Yay!

@mhofman mhofman force-pushed the mhofman/3107-perf-runner branch from 6896aab to 94f9678 Compare August 13, 2021 01:32
@mhofman mhofman requested a review from warner August 16, 2021 23:24
@mhofman mhofman marked this pull request as ready for review August 16, 2021 23:25
@mhofman
Copy link
Member Author

mhofman commented Aug 16, 2021

@warner let me know if the readme and PR description make sense.

Copy link
Member

@warner warner left a comment

Choose a reason for hiding this comment

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

Yeah, that looks good.. it might be good to have an extra paragraph or two near the top as a "welcome testnet validators!" instruction guide, to distinguish between using this repo for dailyperf purposes and using it to complete the run-a-loadgen task that we've asked them to do.

@mhofman
Copy link
Member Author

mhofman commented Aug 17, 2021

I'm gonna fast follow up with another PR that fixes the AMM task and moves the readme, replacing it with something more appropriate.

@mhofman mhofman merged commit dfc7400 into main Aug 17, 2021
@mhofman mhofman deleted the mhofman/3107-perf-runner branch September 13, 2021 22:56
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.

2 participants