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

Add CPU monitor in CI #1389

Open
wants to merge 3 commits into
base: zkevm
Choose a base branch
from
Open

Conversation

cffls
Copy link

@cffls cffls commented Oct 30, 2024

The CPU usage script will monitor cdk-erigon, and fail if the average usage is greater than a threshold.
Sample output:

Monitoring interrupted. Analyzing collected data...

=== CPU Usage Analysis for all cdk-erigon processes ===
Number of measurements: 5
Average Combined CPU Usage: 5.4%
Peak Combined CPU Usage: 6.7%
Threshold: 80%

Final process state:
Individual process details:
PID        CPU%     Command
----------------------------------------
246[88](https://github.com/0xPolygonHermez/cdk-erigon/actions/runs/11602692034/job/32309070380?pr=1389#step:11:89)      0.0      /sbin/docker-init -- /usr/local/share/proc-runner/proc-runner.sh cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
24725      0.0      /bin/sh /usr/local/share/proc-runner/proc-runner.sh cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
24726      0.0      cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
25620      0.0      /sbin/docker-init -- /usr/local/share/proc-runner/proc-runner.sh cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
25657      0.0      /bin/sh /usr/local/share/proc-runner/proc-runner.sh cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
25658      6.7      cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
----------------------------------------

SUCCESS: CPU usage (5.4%) is within threshold of 80%

@cffls
Copy link
Author

cffls commented Oct 31, 2024

CPU utilization test has failed as expected:

Final process state:
Individual process details:
PID        CPU%     Command
----------------------------------------
245[93](https://github.com/0xPolygonHermez/cdk-erigon/actions/runs/11617146310/job/32351693971?pr=1389#step:11:94)      0.0      /sbin/docker-init -- /usr/local/share/proc-runner/proc-runner.sh cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
24629      0.0      /bin/sh /usr/local/share/proc-runner/proc-runner.sh cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
24630      0.0      cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
25534      0.0      /sbin/docker-init -- /usr/local/share/proc-runner/proc-runner.sh cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
25571      0.0      /bin/sh /usr/local/share/proc-runner/proc-runner.sh cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
25572      100.0    cdk-erigon --pprof=true --pprof.addr 0.0.0.0 --config /etc/cdk-erigon/config.yaml
----------------------------------------

ERROR: Average CPU usage ([98](https://github.com/0xPolygonHermez/cdk-erigon/actions/runs/11617146310/job/32351693971?pr=1389#step:11:99).8%) exceeded threshold of 80%

@cffls cffls changed the title Reduce ds client CPU usage and add CPU monitor in CI Add CPU monitor in CI Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants