Publications

Exploring the Characteristics of Hyperledger Fabric in Resource Consumption

2020 2nd Conference on Blockchain Research & Applications for Innovative Networks and Services (BRAINS), Virtual (originally in, Paris, France), 2020, pp. 208-209, doi: 10.1109/BRAINS49436.2020.9223275.

Jeongsu Kim, Kyungwoon Lee, Gyeongsik Yang, Kwanhoon Lee, Jaemin Im, Chuck Yoo

Download PDF

Abstract

As blockchain applications are available in clouds, the resource allocation of blockchain becomes an important issue. This paper investigates the resource consumption of Hyperledger Fabric that is a popular blockchain framework. As Fabric consists of several components, this paper characterizes the resource consumption of Fabric components. Then, we attempt to control the CPU allocation of the components and explore the performance implications. Our evaluation results show that the “proper” CPU allocation of Kafka component reduces the CPU usage of the overall Fabric by 14% but the performance of Fabric does not decrease. Our result suggests that clouds can benefit from such control of CPU allocation to Fabric.

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.

CPU bandwidth-control settings and the reported throughput response.
SettingObserved response
100bwLower CPU use with throughput preserved
50bwLower 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.

Fabric transaction throughput and CPU use under default, 100bw and 50bw Kafka leader allocations.View full-size figure
Bars compare throughput on the left axis and CPU use on the right. The 100bw setting lowers CPU use while preserving throughput; 50bw reduces both.

Key takeaways

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