# QiOi: Performance Isolation for Hyperledger Fabric
## 1 Introduction
As the workers conduct similar operations that are mainly CPU-intensive, their processing characteristics such as the CPU time slices are homogeneous. Therefore, the existing techniques can provide performance isolation for Spark workers by applying the same scheduling policy to the workers simultaneously. On the other hand, Fabric consists of heterogeneous components performing different operations, which makes it difficult to apply the same scheduling policy to the components. For example, peers execute transaction proposals and validate transactions while orderers determine the sequence of transactions. Our profiling results reveal that peers and orderers have different processing characteristics: peers have 2.3 times higher time slice than the orderers. If the existing studies are applied to Fabric without considering the heterogeneous characteristics of the Fabric components, interference between the components could get worse or at least not improve. This paper presents **QiQi**, component-level performance isolation technique for Hyperledger Fabric. Note that component-level means controlling heterogeneous Fabric components that have different impacts on the performance of Fabric. First, we analyze the characteristics of Fabric components using system-level metrics such as scheduling delay and time slice when the components run as containers on the host server. Then, we demonstrate that Fabric can experience performance degradation when Fabric components run with co-located tasks. By analyzing the performance interference at the component-level, we point out that each component has different impacts on performance degradation. Based on the results, we propose QiQi to control CPU scheduling policy at component-level to offer performance isolation. To provide component-level performance isolation, QiQi first receives a certain performance threshold from the Fabric service manager depending on a service. Furthermore, QiQi periodically monitors the performance of Fabric. When it becomes below the threshold, QiQi detects performance interference and dynamically controls CPU scheduling policy of specific components based on the QiQi algorithm. We implement QiQi as a user-level daemon to run on Linux kernel with a Hyperledger Fabric-based blockchain network. Note that QiQi does not require any modification in Linux kernel nor Hyperledger Fabric. We evaluate QiQi with different ordering services, a variety of workloads of Fabric, and practical co-located tasks. Our evaluation results show that QiQi mitigates performance degradation of Fabric by 22% and improves latency of Fabric by 2.5 times without sacrificing the performance of co-located tasks when Fabric components run with co-located tasks. The main contributions of this paper are as follows:  
* We analyze the Fabric components using system-level metrics and show the different impacts of the components on performance interference. * We design QiQi that offers component-level performance isolation for Fabric by periodically monitoring Fabric performance and adjusting CPU scheduling policy for Fabric components. * We implement QiQi as a user-level daemon and present the evaluation results showing that QiQi mitigates performance degradation of Fabric by 22% and improves latency of Fabric by 2.5 times. The rest of the paper is organized as follows. Section 2 explains details of Hyperledger Fabric and Linux CPU scheduler. In Section 3, we analyze the characteristics of Fabric component and demonstrate performance degradation of Fabric running with co-located tasks. Section 4 presents the design and implementation of QiQi, and Section 5 describes evaluation results. Then, Section 6 discusses the future works to further improve this paper, and Section 7 explains related work. Finally, we conclude in Section 8.