Self-Learning Disk Scheduling
Total Page:16
File Type:pdf, Size:1020Kb
50 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 21, NO. 1, JANUARY 2009 Self-Learning Disk Scheduling Yu Zhang and Bharat Bhargava, Fellow, IEEE Abstract—The performance of disk I/O schedulers is affected by many factors such as workloads, file systems, and disk systems. Disk scheduling performance can be improved by tuning scheduler parameters such as the length of read timers. Scheduler performance tuning is mostly done manually. To automate this process, we propose four self-learning disk scheduling schemes: Change-sensing Round-Robin, Feedback Learning, Per-request Learning, and Two-layer Learning. Experiments show that the novel Two-layer Learning Scheme performs best. It integrates the workload-level and request-level learning algorithms. It employs feedback learning techniques to analyze workloads, change scheduling policy, and tune scheduling parameters automatically. We discuss schemes to choose features for workload learning, divide and recognize workloads, generate training data, and integrate machine learning algorithms into the Two-layer Learning Scheme. We conducted experiments to compare the accuracy, performance, and overhead of five machine learning algorithms: decision tree, logistic regression, naı¨ve Bayes, neural network, and support vector machine algorithms. Experiments with real-world and synthetic workloads show that self-learning disk scheduling can adapt to a wide variety of workloads, file systems, disk systems, and user preferences. It outperforms existing disk schedulers by as much as 15.8 percent while consuming less than 3 percent - 5 percent of CPU time. Index Terms—Machine learning, application-transparent adaptation, I/O, operating system. Ç 1INTRODUCTION UE to the physical limitations such as time-consuming selection, and parameter tuning. We intend to design and Dseeks and rotations of disks, performance improve- implement a scheduling system that can adapt to the ments for modern disks have significantly lagged behind varying conditions and achieve optimal performance auto- those of modern microprocessors [18]. I/O systems have matically. We intend to explore if automation can improve become bottlenecks of contemporary computer systems. In efficiency and accuracy and how much overhead it incurs. I/O systems, disk schedulers, responsible for dispatching We propose a new type of intelligent disk I/O schedu- pending requests from file systems to physical disks, must lers, self-learning schedulers, which can learn about the be carefully designed and implemented for performance. storage system, train themselves automatically, adapt Benchmarks show that there is no single disk scheduler to various types of workloads, and make optimal scheduling that could provide good performance consistently under decisions. The proposed self-learning scheduling scheme varying conditions [5]. The performance of disk schedulers characterizes I/O workloads by a number of essential is affected by workloads (such as sequential, random, attributes, classifies them at runtime, and makes the best multimedia, and HTTP-server workloads), file systems I/O scheduling decision in online, offline, and combined (suchasXfs,Ext2,andExt3),disksystems(suchas learning modes. Redundant Array of Independent Disks (RAID), single disk, We discuss four self-learning scheduling schemes, flash disk, and virtual disk), tunable parameters, user namely, Change-sensing Round-Robin, Feedback Learning, preferences (such as performance, response time, and Per-request Learning, and Two-layer Learning. We show fairness), and CPU systems (such as Multicore CPUs and that the novel Two-layer Learning Scheme is the best. The Hyperthreading CPUs). scheme combines workload-level and request-level learning Schedulers have tunable parameters, e.g., the length of algorithms and employs feedback mechanisms. read/write timers. For new system configurations such as Machine learning techniques [50] are effectively used in new file systems or hard disks, we need to retune the self-learning disk schedulers to automate the scheduling disk scheduling system to ensure optimal performance. policy selection and optimization processes. We discuss how For volatile workloads, the disk scheduler must be tuned to implement the self-learning scheduling scheme within the constantly. Tuning systems manually to achieve the best Linux kernel and conduct experiments to compare the I/O performance is difficult. accuracy, performance, and overhead of five machine It is desirable to automate the whole process, including learning algorithms: C4.5 decision tree, logistic regression, file system/workload/disk recognition, scheduling policy naı¨ve Bayes, neural network (NN), and support vector machine (SVM) algorithms. The self-learning scheduler automatically creates I/O performance models, gathers . The authors are with the Department of Computer Science, Purdue University, West Lafayette, IN 47906. system workload information, does both offline and online E-mail: {zhangyu, bb}@cs.purdue.edu. analysis, and fits into the operating system kernel. We Manuscript received 27 Oct. 2007; revised 30 Mar. 2008; accepted 3 June describe how to tune essential parameters of machine 2008; published online 12 June 2008. learning algorithms for disk schedulers. For information on obtaining reprints of this article, please send e-mail to: [email protected], and reference IEEECS Log Number TKDE-2007-10-0535. In our experiments, we modify the kernel I/O schedulers Digital Object Identifier no. 10.1109/TKDE.2008.116. of Linux 2.6.13, feed the system with real-world and 1041-4347/09/$25.00 ß 2009 IEEE Published by the IEEE Computer Society ZHANG AND BHARGAVA: SELF-LEARNING DISK SCHEDULING 51 synthetic workloads, and collect performance data. We use for file system policies such as prefetching. Riska et al. [42] the K-fold cross-validation method [54] to measure the proposed an adaptive scheduling algorithm that can adjust accuracies of all machine learning algorithms. We also its parameters without considering file systems and disks. compare three configuration modes of the self-learning Lumb et al. [44] discussed a free-block scheduler that scheduler: online, offline, and combined configurations. We schedules related background requests together with regular evaluate the performance and overhead for both real-world requests to increase disk bandwidth utilization. Karlsson applications and simulated scenarios. et al. [41] discussed performance isolation and differentia- The rest of the paper is organized as follows: Section 2 tion of storage systems using control-theoretic methods. In discusses related works. Section 3 describes the architecture their approach, users control the throttling of requests. of the self-learning disk I/O scheduling scheme. Section 4 Mokel et al. [20] presented a scheduling framework that introduces the learning components of the self-learning enhances multimedia performances. scheduling scheme. Section 5 evaluates the performance Storage system modeling. There are a number of studies and overhead of the proposed self-learning scheme with on how to model storage systems. Anderson et al. [13] different machine learning algorithms and configurations. analyzed workloads to design and implement a new Section 6 summarizes our research. storage system rather than the I/O scheduler. Wang [14] used machine learning techniques to evaluate the storage 2RELATED WORK system as a black box. Sivathanu et al. [34] discussed a Classic I/O schedulers. The simple First-In, First-Out smart disk system. Hidrobo and Cortes [16] proposed a (FIFO) disk scheduling algorithm incurs significant delays model for disk drives. Riska and Riedel [45] discussed how for almost all types of workloads because of the seek and to characterize disk drive workloads. rotation overhead. The Shortest Seek Time First (SSTF) and Machine learning systems. Researchers have applied the Scan schedulers queue and sort the disk access requests machine learning techniques to enhance various I/O to minimize the individual seek time [9], [10]. There are storage systems but not the I/O schedulers. Stillger et al. algorithms designed to minimize the total seek time and [15] discussed a learning DBMS optimizer that uses a rotation latency, e.g., Shortest Total Access Time First feedback loop to enhance the query optimization. Shen et (SATF) [19]. However, for real-time and other response- al. [37] utilized clustering algorithms to discover bugs time-sensitive systems, algorithms designed to minimize related to the I/O system. System specifications, for seek time may cause starvations of some requests [8]. Real- example, the disk seek time and rotation time, are used time disk scheduling algorithms try to schedule disk access in their approach to predict system performance. Wild- requests with the goal of meeting individual request strom et al. [47] used machine learning algorithms to deadlines. A number of real-time algorithms exist, includ- reconfigure hardware according to workloads. They manu- ing Earliest Deadline First (ED), Earliest Deadline Scan (D- ally ran the system commands to get statistics and used the SCAN), Feasible Deadline Scan (FD-SCAN), and SMART WEKA software package [59] to analyze the data. Seltzer schedulers [8], [11]. For synchronous read requests issued and Small [48] described a high-level in situ simulation by the same process, traditional algorithms suffer from the method for an adaptive operating system. deceptive idleness condition and may cause performance Quality of Service (QoS).