When I saw an offer from Digital Ocean for $10 credit I thought I'd try and run an Ethereum node on their smallest $5 VPS instance ("droplet") for free for two months. (I had to pay $5 on registration so it wasn't completely free.) I tried to find information on how much CPU usage was acceptable (apart from not "excessive"), but couldn't.
It was pretty straightforward to do. I used an Ubuntu image with node.js. I picked Ubuntu by mistake, when I intended to use Debian, but I'm equally unfamiliar with the differences between all the distros, so it didn't make much difference.
I used the cpulimit utility to limit CPU use to 20% while it downloaded the blockchain. Even so the process died a few times, I'm not sure if that was because it was detected as using much CPU, or ran out of memory. I experimented with the limit - 10% seemed to be too low and it couldn't find peers, probably because it was too slow for the other nodes to talk to. After 30% usage for a few minutes it got killed off, but at 20% it downloaded the blockchain in a few hours. I added swap space part way through, in case that helped.
Once it caught up I limited it to 10% as even though it was only downloading a block every few seconds it still seemed to want to use a lot of CPU.
You can sign up for a VPS with $10 credit here: https://www.digitalocean.com/?refcode=6588d64bda60. To be completely transparent - if you sign up and then spend money with them I get up to $25 for each referral. Other VPS hosting companies are available.
(You'll want to set up a firewall and lock things down a bit, but I'm not going to cover that here.)
No comments:
Post a Comment