Performance Characterization and Bottleneck Analysis of Hyperledger Fabric

Canhui Wang, Xiaowen ChuICDCS 2020

TL;DR

This paper dives deep into the performance of Hyperledger Fabric, a popular permissioned blockchain platform. By meticulously analyzing each phase of transaction processing and comparing different ordering services, the authors identify the validation phase as a significant bottleneck, particularly under certain endorsement policies. This work provides crucial insights for optimizing and scaling Hyperledger Fabric deployments.

What Problem Does This Paper Address?

Hyperledger Fabric (HLF) is a leading platform for building private, permissioned blockchains, essential for enterprise applications where trust and access control are paramount. However, understanding its performance characteristics, especially in newer versions, is challenging due to the inherent complexity of distributed systems. Existing performance studies often lack in-depth analysis of individual transaction phases or comprehensive comparisons of different ordering mechanisms. This paper aims to fill this gap by providing a detailed performance evaluation of HLF v1.4.3 LTS, focusing on identifying bottlenecks and understanding how different configurations impact throughput and latency.

Methods

The authors conducted a thorough performance evaluation of Hyperledger Fabric v1.4.3 LTS. Their methodology involved:

  • Phase-wise Analysis: They broke down the transaction lifecycle into three distinct phases: execute, order, and validate, as per HLF's architecture. This allowed for granular performance measurement of each stage.
  • Ordering Service Comparison: They compared the performance of three different ordering services: Solo (single-node), Kafka (distributed, fault-tolerant), and Raft (distributed, fault-tolerant).
  • Endorsement Policy Impact: They investigated the influence of different endorsement policies (OR and AND) on performance, particularly focusing on how they affect scalability and throughput.
  • Benchmarking Setup: They established a controlled experimental environment using 20 machines, with specific configurations for CPUs, memory, and network. They also implemented strategies to avoid bottlenecks in their workload generator, such as separating endorsing and ordering nodes, invoking transactions asynchronously, and using multiple clients.
  • Performance Metrics: Key metrics used were transaction throughput (transactions per second) and transaction latency (time from submission to commitment). They also analyzed "block time" (time to create a new block).

Datasets

Not discussed in the paper. The experiments were conducted on a self-configured cluster of 20 machines.

Key Insights and Ideas

  • Ordering Services are Not the Bottleneck: Surprisingly, the study found no significant performance difference between the Solo, Kafka, and Raft ordering services. This suggests that for many common scenarios, the choice of ordering service might be less critical for overall throughput than other factors.
  • Validation Phase is the Bottleneck: The validate phase consistently emerged as the system's bottleneck. This is attributed to the relatively slow speed of chaincode validation and the heavy computational load on validation nodes.
  • Endorsement Policy Matters Greatly for Scalability: The "OR" endorsement policy exhibited good scalability, allowing for higher transaction throughput. In contrast, the "AND" endorsement policy, which requires endorsements from multiple peers, showed significantly poorer scalability and a lower peak throughput. This is likely due to the limited computing resources of the endorsing peers.
  • Latency Increases Sharply Near Peak Throughput: Transaction latency remains relatively stable up to the system's peak performance. However, once the transaction arrival rate surpasses this peak, latency increases dramatically due to queueing effects and potential transaction rejections.

Key Results

  • Overall Throughput: Maximum throughputs reached around 300 transactions per second (tps) under the OR endorsement policy with a 1-byte transaction size. The AND endorsement policy resulted in a significantly lower peak throughput of around 200 tps.
  • Phase Throughput: Under the OR policy, the execute phase showed good scalability. However, the validate phase was consistently the bottleneck, limiting overall throughput.
  • Latency: Transaction latency increased rapidly as the system approached its peak performance and beyond. The AND policy showed a more pronounced increase in latency compared to OR.
  • Endorsing Peers Scalability: The number of endorsing peers significantly impacted performance. For example, an OR policy with 3 endorsing peers had a peak throughput of 150 tps, while with 10 peers, it reached 300 tps. The AND policy was more constrained, with AND5 peaking at around 210 tps.
  • Ordering Service Nodes Scalability: Adjusting the number of ordering service nodes (Kafka brokers, ZooKeeper) did not significantly impact throughput or latency, reinforcing the idea that the ordering service itself was not the primary bottleneck in their experimental setup.

Limitations and Future Work

  • Testbed Specifics: The results are specific to the experimental setup and hardware used. Different network configurations or hardware might yield different performance characteristics.
  • Older Version: While v1.4.3 LTS is a long-term support release, newer versions of Hyperledger Fabric may have different performance profiles due to ongoing optimizations and feature additions.
  • Workload Simplification: The paper acknowledges that real-world workloads can be more complex, involving varying transaction sizes and more intricate read-write conflicts.
  • Future Work: The authors suggest that further research could explore the impact of different chaincode implementations, more complex endorsement policies, and advanced network configurations on performance. Investigating optimizations for the validation phase would also be a valuable direction.

Summary updated

BibTeX
@inproceedings{wang2020performance,
  author = {Canhui Wang and Xiaowen Chu},
  title = {{Performance Characterization and Bottleneck Analysis of Hyperledger Fabric}},
  booktitle = {ICDCS},
  year = {2020},
  doi = {10.1109/icdcs47774.2020.00165},
}
Figure