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

feat: log cpu utilization in state network report #1549

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

carver
Copy link
Collaborator

@carver carver commented Oct 24, 2024

What was wrong?

Related to #1545 -- to start we at least want to measure CPU usage. However we decide to respond to it, it is a thing we will want to respond to. So this is an experiment to see how well the library works at observing usage, to lay the groundwork for later steps.

How was it fixed?

Add cpu_time to track the amount of cpu usage that trin has. It's a bit hacky to put it in the trin-state report, because it's just measuring everything happening in the process. But since state is not stabilizing (and seems to be the culprit for high usage currently), it seems like a good place to add the log.

It's already been a convenient way to watch my machine react as I experiment with the CPU effect of various changes.

Example log:

2024-10-24T04:53:32.129663Z  INFO trin_state: reports~ data: radius=12% content=53.3/495mb #=131860 disk=204.9mb; msgs: offers=5235/5522, accepts=7070/7070, validations=706/707; cpu=8.4%

@carver carver self-assigned this Oct 24, 2024
Copy link
Member

@ogenev ogenev left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me.

@carver carver merged commit 397976f into ethereum:master Oct 26, 2024
9 checks passed
@carver carver deleted the cpu-monitor branch October 26, 2024 21:07
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