Blockchain – Transactions Per Second on Commodity Hardware

hardwareminingprivate-blockchaintransactions

I am running geth on a private network with the following command:

geth --datadir firstserver --mine --minerthreads 1 --networkid 1300 --rpcport 8000  --rpcaddr 127.0.0.1 --port 30303 --rpcapi="db,eth,net,web3,personal,admin" --rpc --maxpeers 3 --nodiscover  --cache=2048 --memprofilerate=100 --targetgaslimit 210000000000  console

I have 8 GB of RAM and a quad-core CPU. I am running 1 miner thread.

When I run 24 transaction per second from jmeter the system runs fine, but when I increase it to 28 transactions per second the system freezes.

The CPU use is 370%, memory use 90% and I am not able to do any work on that server. I want to get 200+ transactions per second, how can I achieve that? What should I do to achieve such speeds?

Best Answer

The question is old, but I guess it deserves a general answer. For such problems, there are mainly two possibilities:

  • either you don't have enough RAM

  • or you don't have enough computation power (which you can increase through more CPUs)

To decide between those two issues, you can look at the CPU and memory use, but in some cases (like yours) it is not sufficient. So a good way to know is to look at the data while you are mining (e.g. using htop or top). At the beginning, your CPUs should be at 100% each and your memory use should increase slowly. Then, at some point, one of the following should happen:

  1. your RAM use approaches 80-100%, your swap use begins to increase and your CPU use decreases.

  2. your RAM use stays constant, each CPU use stays near 100%.

In the first case, you have not enough RAM. In the second case, you have not enough computation power.

In you case, you said you achieved 360% CPU use. If it is an average use (as outputed by GNU time), then I would say it is a RAM issue (you should have >= 390% else).

I hope it helps.

Related Topic