May 24, 2013 eMMC/SSD File System Tuning Methodology
Table of Contents
1 Introduction...................................................................................................................................5
1.1 Overview................................................................................................................................5
1.2 Acronyms and Abbreviations................................................................................................5
2 Setup.............................................................................................................................................6
2.1 Hardware Setup......................................................................................................................6
2.2 Software Setup.......................................................................................................................6
3 Performance Benchmarking and Optimization.............................................................................7
3.1 Approach................................................................................................................................7
3.2 Measured Performance Parameters.......................................................................................7
3.3 Results Comparison...............................................................................................................8
3.4 Benchmarking Tools and Workload Generators...................................................................8
3.4.1 Flashbench......................................................................................................................8
3.4.2 FIO..................................................................................................................................9
3.5 File Systems and Their Performance Tuning Options.........................................................10
3.5.1 Ext3/Ext4......................................................................................................................11
3.5.2 BTRFS..........................................................................................................................11
3.5.3 F2FS..............................................................................................................................11
3.6 I/O Schedulers......................................................................................................................11
3.7 Expected Results..................................................................................................................12
3.8 Observed Results.................................................................................................................12
3.8.1 Linear and Random Direct Reading.............................................................................13
3.8.2 Linear and Random Direct Writing..............................................................................15
3.8.3 Linear Reading from Multiple Files (grep)...................................................................17
3.8.4 Linear Writing to Multiple Files (untar).......................................................................18
3.8.5 Linear Reading and Writing Multiple Files (compile).................................................19
3.8.6 Random Reading and Writing Multiple Files (fileserver)............................................21
3.8.7 Random Reading and Writing Multiple Memory-mapped Files (database).................22
3.9 Conclusion...........................................................................................................................23
4 SSD Wear Intensity....................................................................................................................24
4.1 Approach..............................................................................................................................24
4.2 Results..................................................................................................................................24
5 Power-Fail Tolerance..................................................................................................................25
5.1 Approach..............................................................................................................................25
5.2 Results..................................................................................................................................26
5.2.1 Ext4...............................................................................................................................26
5.2.2 BTRFS..........................................................................................................................26
5.2.3 F2FS..............................................................................................................................26
5.2.4 Fsck, Mount, and Unmount Performance.....................................................................27
Appendix I. Benchmarking Scripts...............................................................................................28
Tree Structure...........................................................................................................................28
Configuration............................................................................................................................28
Execution..................................................................................................................................28
Sample Usage...........................................................................................................................29
COGENT EMBEDDED