Improving Application Responsiveness with the BFQ Disk I/O Scheduler

Improving Application Responsiveness with the BFQ Disk I/O Scheduler

View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Archivio istituzionale della ricerca - Università di Modena e Reggio Emilia Improving Application Responsiveness with the BFQ Disk I/O Scheduler Paolo Valente Mauro Andreolini Dipartimento di Ingegneria dell’Informazione Dipartimento di Ingegneria dell’Informazione Universit`adi Modena e Reggio Emilia Universit`adi Modena e Reggio Emilia [email protected] [email protected] Abstract sporadic I/O, such as multimedia applications. BFQ has been BFQ (Budget Fair Queueing) is a production-quality,propor- implemented by Checconi and Valente in the Linux kernel, tional-share disk scheduler with a relatively large user base. and is publicly available [2]. Part of its success is due to a set of simple heuristics that we Thanks to the above properties, BFQ allows a user to en- added to the original algorithm about one year ago. These joy the smooth playbackof a moviewhile downloadingother heuristics are the main focus of this paper. files, or while some service is accessing the disk. Unfortu- The first heuristic enriches BFQ with one of the most nately, BFQ may not achieve the same good performance desirable properties for a desktop or handheld system: re- in terms of responsiveness, i.e., time to load, and hence to sponsiveness. The remaining heuristics improve the robust- start, applications, and time to complete the batches of I/O ness of BFQ across heterogeneous devices, and help BFQ to requests that interactive applications issue sporadically. For preserve a high throughput under demanding workloads. To example, what is the start-up time of a large application on a measure the performance of these heuristics we have imple- loaded disk? If the application is guaranteed the same frac- mented a suite of micro and macro benchmarks mimicking tion of the disk throughput as the other applications (as it several real-world tasks, and have run it on three different usually happens), and if many other applications are com- systems with a single rotational disk. We have also compared peting for the disk, then transferring all the sectors needed to our results against Completely Fair Queueing (CFQ), the de- load the application may take a long time. fault Linux disk scheduler. A further important limitation of the original version of BFQ is that it has been thoroughlytested on just one system, Categories and Subject Descriptors D.4.2 [Storage Man- equipped with a low-end disk (to make sure that the disk agement]: Secondary storage; D.4.8 [Performance]: Mea- was the only bottleneck), and under workloads generated surements. by at most five processes reading one private file each. The General Terms Experimentation, measurement, perfor- robustness and the effectiveness of BFQ should be verified mance. across heterogeneous systems, including also RAIDs and solid-state drives (SSD), and against both a higher number of Keywords Disk scheduling, latency, interactive applica- concurrent requests and a sudden increase of the workload. tions, soft real-time applications, throughput, fairness. Finally, in previous work [1] an important problem has been highlighted theoretically: with most mainstream appli- 1. Introduction cations, disk-drive internal queueing—such as Native Com- BFQ is a proportional-share disk scheduler [1] that allows mand Queueing (NCQ)— should cause both fairness and la- each application to be guaranteed the desired fraction of the tency guarantees to be violated with any scheduler, including disk throughput, even if the overall throughput fluctuates. BFQ. However, experimental evidence was still missing. At the same time, BFQ achieves a high disk throughput and guarantees a low latency to applications performinglittle and Contributions of this paper In this paper we report our contributions for overcoming the above limitations of BFQ: Permission to make digital or hard copies of all or part of this work for personal or • A set of simple heuristics added to BFQ to improve re- classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation sponsiveness, preserve a high throughput under demand- on the first page. To copy otherwise, to republish, to post on servers or to redistribute ing workloads and improve the robustness with respect to lists, requires prior specific permission and/or a fee. SYSTOR ’12 June 4–6, Haifa, Israel. to heterogeneous systems. Hereafter we call BFQ+ the Copyright c 2012 ACM 978-1-4503-1448-0/12/06. $10.00 resulting new version of BFQ. • A suite of micro and macro benchmarks [2] mimicking The disk device serves two types of disk requests: reading several real-world tasks, from reading/writing files in par- and writing a set of contiguoussectors. We say that a request allel to starting applications on a loaded disk, to watching is sequential/random with respect to another request, if the a movie while starting applications on a loaded disk. first sector (to read or write) of the request is/is not located • A detailed report of the experimental results collected by just after the last sector of the other request. This definition running the above suite with BFQ+, BFQ and CFQ [14], of a random request is only formal:the further the first sector on three Linux systems with a single rotational disk. One of the request is from the last sector of the reference request, system was NCQ-capable, and we ran our experiments the more the request is random in real terms. also with a FIFO scheduler on it. Requests are issued by the N applications, which repre- sent the possible entities that can compete for disk access in In our experiments we did not consider either sched- a real system, as, e.g., threads or processes. We define the ulers aimed only at throughput boosting or real-time and set of pending requests for an application as the backlog of proportional-share research schedulers. The reason is that the application. We say that an application is backlogged if these schedulers may suffer from more or less obvious la- its backlog is not empty, and idle otherwise. For brevity, we tency problems, as discussed in §5. Addressing these issues denote an application as sequential or random if most times is out of the scope of this paper. the next request it issues is sequential or random with re- Our results with BFQ+ can be summarized as follows: spect to the previous one, respectively. We say that a request differently from CFQ and regardless of the disk load, inter- is synchronous if the application that issued it can issue its active applications now experience almost the same latency next request only after this request has been completed. Oth- as if the disk was idle. At the same time, BFQ+ achieves up erwise we denote the request as asynchronous. We say that to 30% higher throughput than CFQ under most workloads. an application is receiving service from the storage system if The low latency of interactive applications is achieved by one of its requests is currently being served. letting them receive more than their fair share of the disk throughput. Nevertheless, the heuristic fits the original accu- rate service provided by BFQ well enough to still guarantee 3. The original BFQ algorithm that non-interactive, time-sensitive applications (e.g., video In this section we outline the BFQ algorithm. A more de- players) experience a worst-case latency not higher than 1.6 tailed description is available in this technical report [3], times that experienced under CFQ. whereas a full description can be found in the original pa- The scheduling decisions made by BFQ+ comply with per on BFQ [1]. BFQ+ is identical to BFQ, apart from that it keeping a high throughput also with flash-based devices also contains the heuristics described in §4. (§3). This fact and, above all, the new low-latency features BFQ grants exclusive access to the disk to each applica- described in this paper have made BFQ+ appealing to smart- tion for a while, and implements this service model by as- phones as well. In general, BFQ+ has been adopted in a few sociating every application with a budget, measured in num- Linux distributions and is currently the default disk sched- ber of sectors. After an application is selected for service, uler in some Linux-kernel variants as well as in a variant of its requests are dispatched to the disk one after the other, Android. See [2] for more information. and the budget of the application is decremented by the size As for disk-drive internal queueing, our results show that of each request dispatched. The application is deactivated, NCQ does affect service guarantees as foreseen in [1], up to i.e., its service is suspended, only if one of the following the point of making a system unusable. Finally, we are inves- three events occurs: 1) the application finishes its budget, 2) tigating the impact of RAIDs and SSDs, see the conclusions. the application becomes idle and its last request was asyn- chronous, 3) a special budget timeout fires (§3.3). Organization of the paper When an application is deactivated, BFQ performs two In §2 we introduce both the system model and the common actions. First, it assigns a new budget to the application. This definitions used in the rest of the paper. BFQ is then de- budget is calculated using a simple feedback-loopalgorithm, scribed in §3, while the proposed heuristics can be found in described in detail in §3.2. Second, BFQ chooses the next §4. Finally, after describing the related work and the prob- application to serve through an internal fair-queueing sched- lems caused by disk-drive internal queueing in §5, we de- uler, called B-WF2Q+ and described in some detail in §3.1.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us