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

cpu spiking 100% #128

Closed
eyooooo opened this issue Apr 1, 2021 · 1 comment
Closed

cpu spiking 100% #128

eyooooo opened this issue Apr 1, 2021 · 1 comment

Comments

@eyooooo
Copy link

eyooooo commented Apr 1, 2021

Hi there,

Please note that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use discord or the Ethereum stack exchange at https://ethereum.stackexchange.com.

System information

Geth version: geth version

geth@GETH:~$ ./geth_linux version
Geth
Version: 1.0.7
Git Commit: f1d92be
Architecture: amd64
Protocol Versions: [65 64 63]
Go Version: go1.15.5
Operating System: linux
GOPATH=
GOROOT=/usr/lib/golang

OS & Version: Windows/Linux/OSX

geth@GETH:~$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
Commit hash : (if develop)

Expected behaviour

pulling transactions from getBlocks() and then iterating over them to get transactions receipts should not spike cpu to 100% or take a significantly long time.

Actual behaviour

cpu spikes to 100%, all wss connections lag

Steps to reproduce the behaviour

get transactions from getBlocks and iterate over those with getTransactionReceipt and cpu goes byebye

Backtrace

[backtrace]
@unclezoro
Copy link
Collaborator

hi, @eyooooo I believe the CPU spike is expected, get receipts is really CPU consuming. We have done the following improvement to get better performance:

  1. cache the receipts of recent 10000 blocks. [R4R]update receiptsCacheLimit to 10000 #130
  2. provide batch API for get receipts: R4R: add batch query methods #115
    You may try the batch API, but if you iterate receipts over all history blocks, I believe the CPU will be still high.

galaio pushed a commit to galaio/bsc that referenced this issue Jul 31, 2024
…rsion-signal

introduce engine_signalSuperchainV1
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

No branches or pull requests

2 participants