caliper icon indicating copy to clipboard operation
caliper copied to clipboard

Issue with configuration

Open fatmakoubaa opened this issue 4 years ago • 3 comments

Context

I set the number of workers to 50 and the transaction number (txNumber) to 10.

Expected Behavior

the number of successful transactions is 50*10 =500.

Actual Behavior

The result shows 100 successful transactions and 0 fail.

May some one help me to understand how to configure my environment. I want that each worker sends 10 transaction with a rate equals to 15TPS.

fatmakoubaa avatar Jun 09 '21 12:06 fatmakoubaa

Recommend the caliper rocket chat channel: https://chat.hyperledger.org/channel/caliper

Convention is that everything is measured at the SUT side (eg fabric) and then the required TPS/txns are achieved based on the specified number of clients. Beware CPU bottlenecks in the clients.

nklincoln avatar Jun 09 '21 17:06 nklincoln

txNumber is the total number of transactions you want to submit for the round but given you have 50 workers and txNumber set to 10, you are easily going to exceed that and so is impossible to achieve just sending 10 transactions for the round. In your case you want 50 workers to send 10 txns but that's not how fixed-rate works. It balances the tps across the 50 workers to try and achieve a TPS being seen at the blockchain network. So an example of fixed rate that is closer to what you want is

test:
  name: fixed-tps-runs
  description: Benchmark run to enable resource comparison for benchmarks
  workers:
    type: local
    number: 50
  rounds:
    - label: create-asset-100
      description: >-
        Test a submitTransaction() Gateway method against the NodeJS
        `fixed-asset` Smart Contract method named `createAsset`, which inserts
        an asset of size 8000 bytes into the World State database.
      chaincodeID: fixed-asset
      txNumber: 500
      rateControl:
        type: fixed-rate
        opts:
          tps:  15
      workload:
        module: benchmarks/api/fabric/lib/create-asset.js
        arguments:
          chaincodeID: fixed-asset
          byteSize: 100

In the above example it's requesting a tps of 15/sec for a total of 500 (50*10) transactions before the round ends with 50 workers. the result is

+------------------+------+------+-----------------+-----------------+-----------------+-----------------+------------------+
| Name             | Succ | Fail | Send Rate (TPS) | Max Latency (s) | Min Latency (s) | Avg Latency (s) | Throughput (TPS) |
|------------------|------|------|-----------------|-----------------|-----------------|-----------------|------------------|
| create-asset-100 | 500  | 0    | 16.3            | 0.93            | 0.05            | 0.18            | 16.3             |
+------------------+------+------+-----------------+-----------------+-----------------+-----------------+------------------+

given the number or workers it's not going to achieve an exact TPS on the SUT of 15 tps/sec, also you won't know how many tps each worker sent some will be more than others.

davidkel avatar Feb 04 '22 09:02 davidkel

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 30 '22 19:03 stale[bot]