I'm running a geth full node on ubuntu 16.4 server. Recently, I got multiple bandwidth usage notifications from my hosting. They told me that my server has consumed a couple hundred gb and the average consumption is more than 100gb per day. Initially, I thought that my server was under DDoS. However, later I discovered that Geth was causing the problem. After I set -maxpeers=0 my traffic went back normal. How to config Geth to use only reasonable bandwidth?


Wondershaper (which I've used for other purposes but for the same reason) and similar software can be used to throttle your network speed. I'm guessing most of the bandwidth was consumed by uploads, so you can throttle upload only. I don't expect this to cause significantly detrimental effects for your node (assuming you're not using the network for much else) in terms of keeping your own node in sync. It may even improve things on your end.

  • Cool. Does this tool limit the max bandwidth of a process?
    – Yangrui
    Aug 19 '17 at 19:49
  • No; Wondershaper limits the bandwidth of an entire interface. This may not be suitable for your particular use case. I used it to quickly stop a runaway program I had written from saturating my network on a bandwidth-limited VPS before I could properly patch it, amongst other uses. You can probably create a virtual interface for geth and limit that. I've previously run Wondershaper on an OpenVPN network between two VPSes that I own, so it at least works in that context.
    – lungj
    Aug 20 '17 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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