3

I've lunched a Geth server in full node. I think the performance of machine for syncing is not acceptable and needs much more time to be synced fully.
I would like to know if I set maxpeers to a low amount like 0, can I improve the server performance? This is why I think maxpeers will be used as a number of light remote servers that can connect to my full node and retrieve some data from it, and if I say no light server is allowed to use my full node, I might have higher performance.
May you help me please?

2
  • It is a good question. I do not think light clients will affect any sync performance, as the bottleneck is often CPU and disk IO, not network. Commented Apr 30, 2020 at 19:29
  • Alternatively, not sure if Parity warp sync worked on a full node. Commented Apr 30, 2020 at 19:29

1 Answer 1

4

maxpeers indicates how many node will be allowed to communicate with geth. Settings to zero will means the server can't communicate with other nodes. On the other hand having more nodes means it can get new blocks faster. But having too many nodes is also problematic. Geth should try to connect to reasonable number of nodes.

In geth default launch configuration, light server is disabled so they should not cause any problem.

Network bandwidth in general is not the problem to synchronize, IO is more likely to be the issue. Note that it is required to use a good SSD when synchronizing.

5
  • Thank you Ismael. My first Geth server in full mode got synced after about 2 days. But the newer servers takes a long time and they are always about a half of max block number. After starting them, they work well and sync themselves about 20%, but they become slow! Commented May 1, 2020 at 6:27
  • By the way, in Geth official document (geth.ethereum.org/docs/interface/command-line-options) it is said about maxpeers: Maximum number of light clients to serve, or light servers to attach to Commented May 1, 2020 at 6:35
  • 1
    @MohammadSaberi Does nodes have enough peers? Only few peers means synch will be slow. Check if the p2p is accessible from outside, also check IOPS in the servers. There are two options --light.maxpeers and --maxpeers, the first one refers to light clients the second is for regular nodes.
    – Ismael
    Commented May 1, 2020 at 15:32
  • I did not set maxpeers so it is set to 100 by default regarding to original documents. Do you recommend more peers? Commented May 2, 2020 at 16:19
  • @MohammadSaberi I'd leave the default. How many peers are connected to your node? Peers connect and disconnect frequently so there's no guarantee that you will reach 100. Again check your p2p port is accessible from outside and your storage settings.
    – Ismael
    Commented May 2, 2020 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.