polygon-edge
polygon-edge copied to clipboard
cpu load very high
[Subject of the issue]
Description
after uprade code , I run 4 node in pos consensus, one by one cpu load up to 100%
Your environment
- arm Mac 12.5 and aws ec2 server
- v0.5.0 and the newest code commit id : fb219ba224300db08253e67d9cd62d32093cc0da
- develop
Steps to reproduce
I run 4 node in pos consensus
Expected behaviour
cpu load normal
Actual behaviour
one by one cpu load up to 100%
Logs
ec2 server cpu profile top
mac cpu profile top
mac cpu profile pprof pdf profile001.pdf
Proposed solution
consensus_backend.go
func (i *backendIBFT) writeTransactions(
gasLimit,
blockNumber uint64,
transition transitionInterface,
) (executed []*types.Transaction) {
...
for {
select {
case <-blockTimer.C:
return
default:
if stopExecution {
// wait for the timer to expire
continue
}
...
maybe the code cause the problem , both my envirenment have no transcation
Hey @tiankonglan , thank for raising the issue.
It was discovered by the dev team last week and a fix is under way.
Hey @tiankonglan,
We have a PR out to resolve this issue, thank you for the patience 🙏
https://github.com/0xPolygon/polygon-edge/pull/691
great, I will pull it and verify . @zivkovicmilos
I pull the #691 code and run my scence, the cpu is also hight . profile001.pdf @zivkovicmilos @dbrajovic
Thanks for the update, @tiankonglan
We updated the PR with a second fix. Have another go and tell us if the problem persists 👍
@dbrajovic great, I use the PR in my scene, all nodes cpu are normal.