Exploration and Integration of File Systems in Llamaos
Total Page:16
File Type:pdf, Size:1020Kb
Exploration and Integration of File Systems in LlamaOS A thesis submitted to the Division of Research and Advanced Studies of the University of Cincinnati in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE in the School of Electrical and Computing Systems of the College of Engineering and Applied Science November 12, 2014 by Kyle Craig BS Computer Engineering, University of Cincinnati, 2013 Thesis Advisor and Committee Chair: Dr. Philip A. Wilsey Abstract LlamaOS is a minimalist and customizable operating system for Xen-based virtual machines running on parallel cluster hardware. With the addition of LlamaMPI, a custom implementation of the standard Message Passing Interface (MPI), LlamaOS is able to achieve significant performance gains for fine-grained parallel applications. However, the initial setup of LlamaOS lacked full file system support which limited its use to only a limited set of applications. Initially LlamaOS could only support a single read-only file for each instance in the parallel virtual machine. The original design of LlamaOS was motivated by work in parallel discrete-event simulation. However, the single-file file system of LlamaOS had significant drawbacks. For some simulation models, multiple configuration files are needed to fully run properly and to make these models run on LlamaOS the parallel simulator that was being evaluated had to be changed so that only a single configuration file was needed. This went against one of the base principles of LlamaOS: Outside applications can be run with little to no modification. Another major drawback was that the models could not create and write their own results file limiting the amount of data that could be gathered from running in LlamaOS. In order to alleviate these issues this thesis explores the implementation of a bare-bones Virtual File System (VFS) and, consequently, support for a Second Extended File System (Ext2) driver has been added to LlamaOS. In order to test the functionality and performance of the new LlamaOS file system, the bonnie benchmark (a common tool used for benchmarking various types of file I/O at a basic system level) was ported to run within LlamaOS. The benchmark showed promising results, and verified that the file system implementation was functional and able to perform file reads, file writes, and file creation. In addition to the bonnie bench- mark a couple of parallel simulation models were also used to verify that the file system implementation achieved its goal of efficiently supporting parallel simulation within LlamaOS with little to no modification i to the original simulation kernel. ii Acknowledgments I would like to thank my family for supporting me throughout this endeavour. I would like to thank Andrea Giovine for putting up with the late nights and aloof behavior I exhibited while working. I would like to thank Eric Carver and Josh Hay for being great friends that I was able to go through this experience together with. Finally, I would like to Dr. Wilsey for being a great advisor and for just putting up with me in general. Support for this work was provided in part by the National Science Foundation under grant CNS-0915337. iii Contents 1 Introduction 1 1.1 Motivation . 2 1.2 Thesis Overview . 3 2 Background 5 2.1 Virtualization . 5 2.2 Xen Hypervisor . 8 2.3 LlamaOS . 9 2.4 File Systems . 13 2.4.1 The Second Extended File System . 16 2.5 WARPED ............................................. 19 2.5.1 Discrete Event Simulation . 20 2.5.2 Parallel Discrete Event Simulation . 20 2.5.3 Time Warp Mechanism . 22 3 Related Work 24 3.1 The CROCOS Kernel . 24 3.2 Time Warp Operating System . 25 4 Overview of Approach 29 4.1 File System Choice . 29 4.1.1 The FAT File System . 30 iv CONTENTS 4.1.2 The MINIX File System . 32 4.1.3 Final Comparison . 34 4.2 File System Benchmark Research . 34 5 Implementation Details 37 5.1 File System . 37 5.1.1 Virtual File System . 37 5.1.2 Ext2 Driver . 40 5.2 Benchmark Modifications . 45 6 Performance Results 46 6.1 File System Benchmarks . 46 6.2 WARPED Tests . 49 7 Conclusion and Future Work 53 7.1 Summary . 53 7.2 Suggestions for Future Work . 53 7.2.1 LlamaOS . 54 7.2.2 File System Implementation . 54 v List of Figures 2.1 Type-1 Hypervisor ....................................... 6 2.2 Type-2 Hypervisor ....................................... 7 2.3 Comparison of Native and Virtual Linux to LlamaOS [29] . 11 2.4 LlamaNET block diagram [29] ................................ 12 2.5 I-node direct block mapping [19] ............................... 14 2.6 I-node indirect block mapping [19] .............................. 15 2.7 Virtual File System indirection [12] ............................. 17 2.8 Physical structure of the Ext2 file system .......................... 18 2.9 Translation of bitmap to disk blocks [7] ........................... 19 2.10 PDES Illustration [17] ..................................... 21 3.1 Structure of the Time Warp Operating System [23] .................... 26 4.1 Layout of the FAT12/16 File System [5] ........................... 31 4.2 Layout of the MINIX File System [41] ............................ 33 5.1 Flowchart of the fs open function. .............................. 39 6.1 Bar Chart Demonstrating Increase in Speed with File Size . 48 6.2 Comparison of Native and LlamaOS Simulation Times . 51 vi List of Tables 2.1 Xen para-virtualized x86 interface [8] ............................ 9 4.1 Comparison of FAT, MINIX, and Ext2 file systems ..................... 34 6.1 Test System Specifications ................................... 46 6.2 Averages of bonnie results by file size ............................ 47 6.3 Native bonnie results for test system ............................. 47 6.4 Comparison between LlamaOS and Native for epidemic model . 51 vii Chapter 1 Introduction In recent years significant improvements have been made in the field of virtualization [6, 32]. The x86 architecture, which has historically not supported hardware virtualization, has now been extended. Instead of relying on paravirtualization [32] or intricate binary translation from Virtual Machine Monitors (VMMs) such as VMware Workstation [40], virtualization in hardware is now directly supported by all major x86 CPU manufacturers [6]. One field able to take advantage of hardware virtualization is High-Performance Computing (HPC). In general, HPC users do not care about the space and time multiplexing that hardware virtualization provides. They are more focused on pushing the limits of CPU performance and memory size. Because they are trying to push these limits, HPC tends to require a significant portion of operating system customization. Most HPC applications provide extremely different workloads than those provided by typical servers or workstations [32]. Virtualization is able to aid with this operating system customization, and now that VMMs have easier direct hardware access, their full potential can be explored. Virtualization allows for the quick creation and destruction of multiple operating system instances on a single machine. This significantly decreases the cost of HPC by removing the need to purchase expensive data clusters. Virtual clusters can be created, and each individual virtual machine can run a specialized operating system to better utilize the hardware running underneath [32]. One such attempt at a specialized operating system is the Low-LAtency Minimal Appliance Operating System (or LlamaOS) [29] being de- veloped at the University of Cincinnati. LlamaOS works by launching a virtualized cluster of LlamaOS 1 CHAPTER 1. INTRODUCTION 1.1. MOTIVATION virtual machines. Communication between nodes within a LlamaOS cluster is achieved by LlamaNET. Lla- maNET was developed as a high performance, lightweight communication protocol to decreased the latency between the machines in a cluster and boost I/O and parallel computation performance. Testing showed that LlamaNET was a massive success, and that it could reduce latency by an order of magnitude over native networking applications for message sizes below 1KB [20]. This opened up the idea to further improve LlamaOS and explore different avenues to decrease parallel simulation runtime; however, before further performance improvements could be made, additional modules needed to be added to the core of the LlamaOS solution. The first of these improvements was the addition of a virtual file system [12] and a driver to support the second extended file system (Ext2) [35]. 1.1 Motivation Although LlamaOS has the capability to show significant one-way message passing latency decreases with the use of LlamaNET [29], it still has a lot of areas that are underdeveloped. The first of these areas is file system I/O. Until 2013 LlamaOS lacked the capability for applications to have their own specific configuration files. This was largely an issue for the more complex WARPED [30] simulation models that required a configuration file detailing many different running parameters. A quick fix was created to solve this issue that involved the implementation of support for a single-file file system. This was a flat file system that contained no directory structure and was only able to contain a single configuration file. The current limitations with the file system are as follows [20]: • The file needs to be statically declared and loaded into memory at the start of the instance. • The file is read-only and new files cannot be created. • The file system does not contain directories or any hierarchical structure. • The file needs to be padded to 512 byte segments. These limitations hinder the ability of LlamaOS to perform in depth testing of simulation models that require even the most basic of file system operations. 2 CHAPTER 1. INTRODUCTION 1.2. THESIS OVERVIEW To overcome these limitations this thesis explores the expansion of LlamaOS to incorporate a Virtual File System (VFS) and a second extended file system (Ext2) driver. These changes allow LlamaOS to perform basic yet necessary operations to a single disk formatted with the Ext2 file system.