0

I configured send rate at 500 tps and I am using only one client so send rate should be around 500tps but in generated report send rate is around 130-40 tps. Why there is so much deviation?

I am using fabric ccp version of caliper.

I expect the send rate around 450-480 but the actual send rate is around 130-40 tps. enter image description here

Alok Swain
  • 6,409
  • 5
  • 36
  • 57

1 Answers1

3

Node.js is a single-threaded framework (async/await just means deferred execution, not parallel execution). Caliper runs a loop with the following step:

  1. Waiting for the rate controller to enable the next TX
  2. Creates an async operation in which the user module will call the blockchain adapter.

All of the pending TXs eat up some CPU time (when not waiting for I/O), plus other operations are also scheduled (like sending updates about TXs to the master process).

To reach 500 TPS, the rate controller must enable a TX every 2ms. That's not a lot of time. Try spawning more than 1 local clients, so the load will be shared among them (100 TPS/client for 5 clients, 50 TPS/client for 10 clients, etc).

Attila Klenik
  • 753
  • 6
  • 13
  • Attila, wouldn't we face the same problem by spawning more clients? Every one of them would be competing for the same resources and given that we did not change the available resource we will end up pretty much in the same situation, I guess! – utxeee Feb 09 '21 at 10:00
  • That depends on your resources. With a single client/worker process, the corresponding single thread constrains your sending rate after a certain load. If you launch multiple workers, you essentially do multithreaded load generation (achieved with multiple processes). You're still utilizing the same hardware (CPU cores), so the scalability is still limited. However, newer Caliper versions allow for truly distributed workers spanning multiple machines, which means unbounded horizontal scalability. – Attila Klenik Apr 23 '21 at 12:34