TPC-C Load Phase
Before starting the workload, you need to load the data. Make sure to replace the IP addresses with that of the nodes in the cluster. Loader threads allow you to configure the number of threads used to load the data. For a 3-node c5d.4xlarge cluster, loader threads value of 48 was optimal.
$ ./tpccbenchmark --create=true --nodes=127.0.0.1,127.0.0.2,127.0.0.3
$ ./tpccbenchmark --load=true \
--nodes=127.0.0.1,127.0.0.2,127.0.0.3 \
--warehouses=100 \
--loaderthreads 48
Cluster | 3 nodes of type `c5d.4xlarge` |
Loader threads | 48 |
Loading Time | ~20 minutes |
Data Set Size | ~80 GB |
Tune the --loaderthreads
parameter for higher parallelism during the load, based on the number and type of nodes in the cluster. The specified 48 threads value is optimal for a 3-node cluster of type c5d.4xlarge (16 vCPUs). For larger clusters or computers with more vCPUs, increase this value accordingly. For clusters with a replication factor of 3, a good approximation is to use the number of cores you have across all the nodes in the cluster.
TPC-C Execute Phase
You can run the workload against the database as follows:
$ ./tpccbenchmark --execute=true \
--nodes=127.0.0.1,127.0.0.2,127.0.0.3 \
--warehouses=100
TPC-C Benchmark Results
Cluster | 3 nodes of type `c5d.4xlarge` |
TPMC | 1271.77 |
Efficiency | 98.89% |
Latencies |
New Order Avg: 68.265 msecs, p99: 574.339 msecs Payment Avg: 19.969 msecs, p99: 475.311 msecs OrderStatus Avg: 13.821 msecs, p99: 571.414 msecs Delivery Avg: 67.384 msecs, p99: 724.67 msecs StockLevel Avg: 114.032 msecs, p99: 263.849 msecs |
Once the execution is completed, the TPM-C number along with the efficiency is printed, as follows:
04:54:54,560 (DBWorkload.java:955) INFO - Throughput: Results(nanoSeconds=1800000866600, measuredRequests=85196) = 47.33108832382159 requests/sec reqs/sec
04:54:54,560 (DBWorkload.java:956) INFO - Num New Order transactions : 38153, time seconds: 1800
04:54:54,560 (DBWorkload.java:957) INFO - TPM-C: 1,271.77
04:54:54,560 (DBWorkload.java:958) INFO - Efficiency : 98.89%
04:54:54,596 (DBWorkload.java:983) INFO - NewOrder, Avg Latency: 68.265 msecs, p99 Latency: 574.339 msecs
04:54:54,615 (DBWorkload.java:983) INFO - Payment, Avg Latency: 19.969 msecs, p99 Latency: 475.311 msecs
04:54:54,616 (DBWorkload.java:983) INFO - OrderStatus, Avg Latency: 13.821 msecs, p99 Latency: 571.414 msecs
04:54:54,617 (DBWorkload.java:983) INFO - Delivery, Avg Latency: 67.384 msecs, p99 Latency: 724.67 msecs
04:54:54,618 (DBWorkload.java:983) INFO - StockLevel, Avg Latency: 114.032 msecs, p99 Latency: 263.849 msecs
04:54:54,619 (DBWorkload.java:792) INFO - Output Raw data into file: results/oltpbench.csv