caliper
caliper copied to clipboard
Issue with configuration
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.
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.
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.
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.