A New I/O Scheduler for Solid State Devices
Total Page:16
File Type:pdf, Size:1020Kb
View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Texas A&M Repository A NEW I/O SCHEDULER FOR SOLID STATE DEVICES A Thesis by MARCUS PAUL DUNN Submitted to the Office of Graduate Studies of Texas A&M University in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE August 2009 Major Subject: Computer Engineering A NEW I/O SCHEDULER FOR SOLID STATE DEVICES A Thesis by MARCUS PAUL DUNN Submitted to the Office of Graduate Studies of Texas A&M University in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE Approved by: Chair of Committee, Narasimha Annapareddy Committee Members, Sunil P. Khatri Riccardo Bettati Head of Department, Costas N. Georghiades August 2009 Major Subject: Computer Engineering iii ABSTRACT A New I/O Scheduler for Solid State Devices. (August 2009) Marcus Paul Dunn, B.S., Texas A&M University Chair of Advisory Committee: Dr. Narasimha Annapareddy Since the emergence of solid state devices onto the storage scene, improvements in capacity and price have brought them to the point where they are becoming a viable alternative to traditional magnetic storage for some applications. Current file system and device level I/O scheduler design is optimized for rotational magnetic hard disk drives. Since solid state devices have drastically different properties and structure, we may need to rethink the design of some aspects of the file system and scheduler levels of the I/O subsystem. In this thesis, we consider the current approach to I/O scheduling and show that the current scheduler design may not be ideally suited to solid state devices. We also present a framework for extracting some device parameters of solid state drives. Using the information from the parameter extraction, we present a new I/O scheduler design which utilizes the structure of solid state devices to efficiently schedule writes. The new scheduler, implemented on a 2.6 Linux kernel, shows up to 25% improvement for common workloads. iv DEDICATION To my family v ACKNOWLEDGEMENTS I am first and foremost extremely grateful to my advisor, Dr. A. L. Narasimha Reddy for allowing me the opportunity to work with him throughout my graduate career. His advice, guidance and encouragement have been a tremendous help to me and without him, none of this work would be possible. I am also grateful to all of the faculty that have taught me over the course of my tenure at A&M. I would also like to thank my family, especially my parents, for supporting me along my way, through the good times and the bad. Finally, I am incredibly thankful for my fiancée and her support throughout the entire process of researching and writing this thesis. Her patience and love have encouraged me more than mere words could ever express. vi TABLE OF CONTENTS Page ABSTRACT .............................................................................................................. iii DEDICATION .......................................................................................................... iv ACKNOWLEDGEMENTS ...................................................................................... v TABLE OF CONTENTS .......................................................................................... vi LIST OF FIGURES ................................................................................................... viii CHAPTER I INTRODUCTION ................................................................................ 1 II I/O SCHEDULERS .............................................................................. 8 Motivation ...................................................................................... 8 Noop Scheduler .............................................................................. 9 Deadline Scheduler ........................................................................ 10 Anticipatory Scheduler ................................................................... 11 Completely Fair Queuing ............................................................... 12 Scheduler Comparison ................................................................... 13 III FLASH DRIVE CHARACTERISTICS ............................................... 17 Random v. Sequential Performance ............................................... 17 Flash-specific Performance Tests ................................................... 24 IV NEW SCHEDULER DESIGN ............................................................. 31 vii CHAPTER Page V RESULTS .............................................................................................. 37 Iozone Sequential Tests .................................................................. 37 Iozone Mixed Workload Tests ....................................................... 38 Postmark Benchmark ..................................................................... 39 Dbench Performance ...................................................................... 41 OLTP Benchmark .......................................................................... 42 NILFS Performance ....................................................................... 43 VI CONCLUSIONS AND FUTURE WORK .......................................... 45 REFERENCES .......................................................................................................... 47 VITA ......................................................................................................................... 51 viii LIST OF FIGURES Page Figure 1 – Internal Flash Architecture ............................................................................... 2 Figure 2 – Simplified Linux I/O Stack ............................................................................... 5 Figure 3 – Schedulers Reordering I/O Requests .............................................................. 13 Figure 4 - Scaled Comparison of Schedulers on HDD (Lower is Better) ........................ 14 Figure 5 - Scaled Comparison of Schedulers on SSD (Lower is Better) ......................... 15 Figure 6 - Sequential Read Performance .......................................................................... 18 Figure 7 - Random Read Performance ............................................................................. 18 Figure 8 - Sequential Write Performance ......................................................................... 19 Figure 9 - Sequential Write Performance (Detail) ........................................................... 20 Figure 10 – Random Write Performance (Detail) ............................................................ 20 Figure 11 – Multi-process Performance (Higher is Better) .............................................. 21 Figure 12 – Delay Experiment (One Process, Higher is Better) ...................................... 22 Figure 13 – Delay Experiment (Eight Processes, Higher is Better) ................................. 23 Figure 14 – 32KB Stride Test .......................................................................................... 25 Figure 15 – 64KB Stride Test .......................................................................................... 26 Figure 16 – 512k Stride Test ............................................................................................ 27 Figure 17 – 1M Stride Test .............................................................................................. 27 Figure 18 – Striding Test Summary for Transcend .......................................................... 29 Figure 19 – Striding Test for Memoright Drive ............................................................... 29 ix Page Figure 20 – Striding Test for Samsung Drive .................................................................. 30 Figure 21 - Four Request Positioning Cases (1-4 from Top) ........................................... 35 Figure 22 - Iozone Sequential Tests (Higher is Better) .................................................... 37 Figure 23 - Iozone Mixed Workload Performance (Higher is Better) ............................. 39 Figure 24 - Postmark Performance (Lower is Better) ...................................................... 39 Figure 25 - Postmark Summary (Lower is Better) ........................................................... 41 Figure 26 - Dbench Performance (Higher is Better) ........................................................ 42 Figure 27 - OLTP Database Performance (Lower is Better) ........................................... 43 Figure 28 - Dbench Performance on NILFS2 File System. (Higher is Better) ................ 44 1 CHAPTER I INTRODUCTION In recent years, enormous advances in the area of solid state storage devices have begun to attract wide attention[7,4,17,24,9]. With capacities exceeding 100GB and prices falling drastically, consumers are now able to seriously consider the possibility of using a flash-based drive as their primary storage device in their computer. This is becoming an especially attractive option in many laptops where size, weight, and power consumption are all primary concerns. As solid state drives become more ubiquitous, it becomes necessary to examine and adapt to the differences between flash drives and more traditional magnetic-based storage devices. For example, while read speeds of flash drives are generally much faster than traditional disks, write speeds, especially random write speeds, may not have such a clear advantage in performance. Since solid state devices have no mechanical