bsc icon indicating copy to clipboard operation
bsc copied to clipboard

Event subscriptions and node overload

Open md0x opened this issue 4 years ago • 1 comments

Hi, I have noticed that my bsc node suffers an important load increase when subscribing to events. I am the only consumer of the node and subscribing to 60 different events from some contracts results in a high cpu and ram consumption increase unsyncing my node often.

It looks like it's less efficient to subscribe to 60 events than run 5000 requests/second.

This is how I run the node

    bsc --config /config.toml --datadir /root/.ethereum \
    --syncmode fast --cache "20000" --maxpeers "50" \
    --snapshot=false --txlookuplimit=0 \
    --rpc --rpcaddr "0.0.0.0" --http --http.port 8575 --http.addr "0.0.0.0" --http.api "eth,net,web3,debug,txpool" \
    --ws --ws.addr "0.0.0.0" --ws.port "8547" --ws.origins "*" --ws.api "eth,net,web3,txpool,debug"

Has anyone experienced something similar?

md0x avatar Jul 28 '21 11:07 md0x

what's the hardware or server specs that your node is running on?

I have somewhat similar issues but I'm subscribing to only pending Txns and doing a Debug_TraceCall on each Txns. That puts my node under pressure (Debug_TraceCall response goes from ms to seconds) and causes my node to be out of sync very often.

Just to compare with yours:

sudo ./geth_linux --config ./config.toml --datadir ./node --rpc.allow-unprotected-txs --txlookuplimit 0 --http.api web3,eth,miner,net,txpool,debug --rpc --rpcaddr 0.0.0.0 --rpcport 8545 --rpcapi web3,eth,personal,miner,net,txpool,debug console --ipcpath geth.ipc --maxpeers 6000 config.txt

FeurJak avatar Jul 28 '21 23:07 FeurJak