Why send rate is lower than configured rate in config.yaml (hyperledger caliper) even after use of only one client?

522 Views Asked by At

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

1

There are 1 best solutions below

2
Attila Klenik On

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).