
Enlightening the I/O Path: A Holistic Approach for Application Performance Sangwook Kim, Apposha and Sungkyunkwan University; Hwanju Kim, Sungkyunkwan University and Dell EMC; Joonwon Lee and Jinkyu Jeong, Sungkyunkwan University https://www.usenix.org/conference/fast17/technical-sessions/presentation/kim-sangwook This paper is included in the Proceedings of the 15th USENIX Conference on File and Storage Technologies (FAST ’17). February 27–March 2, 2017 • Santa Clara, CA, USA ISBN 978-1-931971-36-2 Open access to the Proceedings of the 15th USENIX Conference on File and Storage Technologies is sponsored by USENIX. Enlightening the I/O Path: A Holistic Approach for Application Performance Sangwook Kim†§, Hwanju Kim§,∗ Joonwon Lee§, Jinkyu Jeong§ †Apposha, §Sungkyunkwan University [email protected], [email protected], [email protected], [email protected] Abstract main reason for this form of structuring is to reduce re- quest handling latency by taking off the internal activ- In data-intensive applications, such as databases and key- ities from the critical path of request execution. How- value stores, reducing the request handling latency is im- ever, background tasks are still interfering foreground portant for providing better data services. In such appli- tasks since they inherently share the I/O path in a stor- cations, I/O-intensive background tasks, such as check- age stack. For example, background checkpointing in pointing, are the major culprit in worsening the latency relational database has known to hinder delivering low due to the contention in shared I/O stack and storage. and predictable transaction latency, but the database and To minimize the contention, properly prioritizing I/Os operating system (OS) communities have no reasonable is crucial but the effectiveness of existing approaches is solution despite their collaborative efforts [12]. limited for two reasons. First, statically deciding the pri- The best direction to resolve this problem in OS is to ority of an I/O is insufficient since high-priority tasks provide an interface to specify I/O priority for a differen- can wait for low-priority I/Os due to I/O priority inver- tiated storage I/O service. Based on this form of OS sup- sion. Second, multiple independent layers in modern port, two important issues should be addressed: 1) decid- storage stacks are not holistically considered by exist- ing which I/O should be given high priority, and 2) effec- ing approacheswhich thereby fail to effectively prioritize tively prioritizing high priority I/Os along the I/O path. I/Os throughout the I/O path. The conventional approaches for classifying I/O priori- In this paper, we propose a request-centric I/O priori- ties are I/O-centric and task-centric. These approaches tization that dynamically detects and prioritizes I/Os de- statically assign high priority to a specific type of I/O laying request handling at all layers in the I/O path. The (e.g., synchronous I/O [30, 2, 32]) and to I/Os issued by proposed scheme is implemented on Linux and is eval- a specific task (e.g., interactive task [42]). This I/O pri- uated with three applications, PostgreSQL, MongoDB, ority is typically enforced at the block-level scheduler or and Redis. The evaluation results show that our scheme at several layers [42, 43]. achieves up to 53% better request throughput and 42× better 99th percentile request latency (84 ms vs. 3581 The previous approaches, however, have limitations in ms), compared to the default configuration in Linux. achieving high and consistent application performance. First, they do not holistically consider multiple indepen- 1 Introduction dent layers including caching, file system, block, and de- vice layers in modern storage stacks. Missing I/O pri- In data-intensive applications, such as databases and oritization in any of the layers can degrade application key-value stores, the response time of a client’s re- performance due to delayed I/O processing in such lay- quest (e.g., key-value PUT/GET) determines the level ers (Section 2.1). Second, they do not address the I/O of application performance a client perceives. In this priority inversion problem caused by runtime dependen- regard, many applications are structured to have two cies among concurrent tasks and I/Os. Similar to the types of tasks: foreground tasks, which perform essen- priority inversion problem in CPU scheduling [35], low- tial work for handling requests, and background tasks, priority I/Os (e.g., asynchronous I/Os and background which conduct I/O-intensive internal activities, such as I/Os) sometimes can significantly delay the progress of a checkpointing [31, 14, 3], backup [11, 9, 24, 18], com- high-priority foreground task, thereby inverting I/O pri- paction [21, 34, 38, 13], and contents filling [36]. The ority (Section 2.2). More seriously, I/O priority inver- ∗Currently at Dell EMC sions can occur across different layers in a storage stack. USENIX Association 15th USENIX Conference on File and Storage Technologies 345 CFQ SPLIT-A QASIO Due to these limitations, existing approaches are limited CFQ-IDLE SPLIT-D RCP in effectively prioritizing I/Os and result in suboptimal 30 performance. 25 In this paper, we introduce a request-centric I/O pri- 20 oritization (or RCP for short) that holistically prioritizes 15 critical I/Os (i.e., performance-critical I/Os) over non- 10 critical ones along the I/O path; we define a critical I/O 5 as an I/O in the critical path of request handling regard- Operation thput (Kops/sec) 0 0 5 10 15 20 25 30 less of its I/O type and submitting task. Specifically, Elapsed time (min) our scheme identifies foreground tasks by exposing an API and gives critical I/O priority to the foregroundtasks Figure 1: Limitation of existing approaches. Update- (Section 4.1). To handle I/O priority inversions, critical heavy workload in YCSB is executed against MongoDB. I/O priority is dynamically assigned to a task or an out- standing I/O on which a foregroundtask dependsto make denoted as CFQ-IDLE, is also ineffective in alleviat- progress (Section 4.2). Then, each layer in the I/O path ing the performance interference. Moreover, Split-AFQ is adapted to prioritize the critical I/Os and to support (SPLIT-A) and Split-Deadline (SPLIT-D), the state-of- I/O priority inheritance (Section 4.3). We also resolve an the-art cross-layer I/O schedulers [43], also cannot pro- I/O priority inversion caused by a transitive dependency, vide consistent application performance even though the which is a chain of dependenciesinvolvingmultiple tasks checkpoint thread is given lower priority than foreground (Section 4.4). ones; adjusting the parameters in the SPLIT-A/D (e.g., As a prototype implementation, we enlightened the fsync() deadline) did not show any noticeable im- I/O path of the Linux kernel. Specifically, in order to provement. Likewise, QASIO [32], which tries to elimi- accurately identify I/O criticality, we implemented the nate I/O priority inversions, also shows frequent drops in I/O priority inheritance to blocking-based synchroniza- application performance. tion methods (e.g., mutex) in the Linux kernel. Based The root causes of this undesirable result in the ex- on the identified I/O criticality, we made the Linux isting I/O prioritization schemes are twofold. First, the caching layer, ext4 file system, and the block layer un- existing schemes do not fully consider multiple indepen- derstand and enforce I/O criticality. Based on the proto- dent layers including caching, file system, and block lay- type, we evaluated our scheme using PostgreSQL [10], ers in modern storage stacks. Prioritizing I/Os only in MongoDB [8], and Redis [22] with TPC-C [17] and one or two layers of the I/O path cannot achieve proper YCSB [25] benchmarks. The evaluation results have I/O prioritization for foreground tasks. Second and more shown that our scheme effectively improves request importantly, the existing schemes do not address the I/O throughput and tail latency (99.9th percentile latency) by priority inversion problem caused by runtime dependen- about 7–53% and 4.4–20×, respectively, without penal- cies among concurrent tasks and I/Os. I/O priority in- izing background tasks, compared to the default config- versions can occur across different I/O stages in multi- uration in Linux. ple layers due to transitive dependencies. As shown by RCP in Figure 1, the cliffs in application throughput can 2 Motivation and Related Work be significantly mitigated if the two challenges are ad- dressed. In the rest of this section, we detail the two chal- Background I/O-intensive tasks, such as checkpointing lenges from the perspective of application performance and compaction, are problematic for achieving the high and discuss existing approaches. degree of application performance. We illustrate this problem by running the YCSB [25] benchmark against 2.1 Multiple Independent Layers MongoDB [8] document store on a Linux platform with two HDDs each of which is allocated for data and jour- In modern OSes, a storage I/O stack is comprised of multiple and independent layers (Figure 2). A caching nal, respectively; see Section 7 for the details. As shown layer first serves reads if it has the requested block and in Figure 1, application performance represented as op- erations per second is highly fluctuated with the CFQ [2], it buffers writes until they are issued to a lower layer. If a read miss occurs or a writeback of buffered writes is the default I/O scheduler in Linux, mainly due to the con- required, a file system generates block I/O requests and tention incurred by periodic checkpointing (60 seconds passes them to a block layer.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages15 Page
-
File Size-