Paper summary
Profile the components before allocating CPUs
A blockchain’s components can consume CPU very differently, even within the same deployment.
This Hyperledger Fabric study measures CPU use across peers, orderers and the Kafka-based ordering service. It then investigates the Kafka leader, which consumes the largest CPU share in the measured configuration.
Control the ordering leader’s CPU allocation
The experiments use Linux CFS bandwidth control to vary the Kafka leader’s allowed execution time. The setting called 100bw permits one CPU’s worth of runtime; it caps the allowed CPU runtime. Scheduler profiling then checks how that control changes time slices and context switches.
| Setting | Observed response |
|---|---|
| 100bw | Lower CPU use with throughput preserved |
| 50bw | Lower CPU use and lower throughput |
Reduce CPU use without losing throughput
With 100bw, total Fabric CPU use falls from 524% to 453%, while throughput changes from 330 to 337 transactions per second. At 50bw, throughput falls to 285 transactions per second. These results come from the smallbank workload on a single-server Fabric 1.4.1 deployment with Kafka ordering.
View full-size figureKey takeaways
- CPU use is shaped by component roles and scheduling. The ordering leader’s profile explains why changing CPU allocation can change resource use without a matching throughput change.