13

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?

6
  • I have moved the discussion to chat for better readability, please do not leave a comment here, but join the chat room linked in this comment to discuss the topic.
    – q9f
    Jan 11, 2017 at 14:03
  • 1
    You need to be more specific as to what the transaction transacts with. A transactions that transacts with a contract requires more CPU time than a transaction that transacts with an empty account. Could you provide some more details so I can perhaps more adequately answer your question?
    – Jeffrey W.
    Jan 11, 2017 at 19:05
  • @JeffreyW. any type of transaction . suppose i am executing an function to update variable of contract . Jan 12, 2017 at 4:57
  • @Himanshusharma you can't say "any transaction". Large complex contracts require more time to execute than small ones. It's like asking "how many programs can I fit in 1GB of ram" - it depends on the size of the program. Transaction throughout isn't a good measurement for ethereum because of it's arbitrary nature.
    – Jeffrey W.
    Jan 14, 2017 at 20:59
  • I guess it depends whether you are using HDD or SSD. Usually HDD is the bottleneck Jul 18, 2017 at 12:41

1 Answer 1

2

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.

Your Answer

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

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