The Composite-File File System: Decoupling the One-to-one Mapping of Files and Metadata for Better Performance Shuanglong Zhang, Helen Catanese, Andy An-I.

Slides:



Advertisements
Similar presentations
Snapshots in a Flash with ioSnap TM Sriram Subramanian, Swami Sundararaman, Nisha Talagala, Andrea Arpaci-Dusseau, Remzi Arpaci-Dusseau Copyright © 2014.
Advertisements

File Systems.
SYSTOR2010, Haifa Israel Optimization of LFS with Slack Space Recycling and Lazy Indirect Block Update Yongseok Oh The 3rd Annual Haifa Experimental Systems.
Ceph: A Scalable, High-Performance Distributed File System
Allocation Methods - Contiguous
File Management Systems
CS 333 Introduction to Operating Systems Class 18 - File System Performance Jonathan Walpole Computer Science Portland State University.
1 File Management in Representative Operating Systems.
File System Implementation
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Flashing Up the Storage Layer I. Koltsidas, S. D. Viglas (U of Edinburgh), VLDB 2008 Shimin Chen Big Data Reading Group.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.
Mayuresh Varerkar ECEN 5613 Current Topics Presentation March 30, 2011.
Introduction to DFS. Distributed File Systems A file system whose clients, servers and storage devices are dispersed among the machines of a distributed.
Ceph: A Scalable, High-Performance Distributed File System
CE Operating Systems Lecture 17 File systems – interface and implementation.
CS333 Intro to Operating Systems Jonathan Walpole.
12/18/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam.
Full and Para Virtualization
Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication.
Instance Discovery and Schema Matching With Applications to Biological Deep Web Data Integration Tantan Liu, Fan Wang, Gagan Agrawal {liut, wangfa,
Lecture 01: Computer Architecture overview. Our Goals ● Have a better understanding of computer architecture – Write better (more efficient) programs.
The Reiser4 File System An introduction to the path-breaking new file system, and some insights into the underlying philosophy.
Day 28 File System.
File System Implementation
Internal Parallelism of Flash Memory-Based Solid-State Drives
Chapter 11 & 12: File System Interface and Implementation
Failure-Atomic Slotted Paging for Persistent Memory
Jonathan Walpole Computer Science Portland State University
BD-Cache: Big Data Caching for Datacenters
Chapter 11: File System Implementation
Chapter 11: File System Implementation
Chapter 11: Implementing File Systems
Chapter 12: File System Implementation
Selective Code Compression Scheme for Embedded System
Chapter 11: File System Implementation
I/O Resource Management: Software
Operating Systems (CS 340 D)
Introduction to Computers
Jiang Zhou, Wei Xie, Dong Dai, and Yong Chen
Lecture 45 Syed Mansoor Sarwar
File Sharing Sharing of files on multi-user systems is desirable
Chapter 11: File System Implementation
File Structure 2018, Spring Pusan National University Joon-Seok Kim
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Naming and Directories
Naming and Directories
Chapter 2: System Structures
Chapter 11: File System Implementation
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Overview Continuation from Monday (File system implementation)
Directory Structure A collection of nodes containing information about all files Directory Files F 1 F 2 F 3 F 4 F n Both the directory structure and the.
Chapter 8: Memory management
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Overview: File system implementation (cont)
Persistence: hard disk drive
PARAMETER-AWARE I/O MANAGEMENT FOR SOLID STATE DISKS
Contents Memory types & memory hierarchy Virtual memory (VM)
CSE 451 Fall 2003 Section 11/20/2003.
CSE451 Virtual Memory Paging Autumn 2002
Lecture 3: Main Memory.
Chapter 11: File System Implementation
Department of Computer Science
Naming and Directories
Chapter 14: File System Implementation
CSE 542: Operating Systems
Introduction to Operating Systems
Presentation transcript:

The Composite-File File System: Decoupling the One-to-one Mapping of Files and Metadata for Better Performance Shuanglong Zhang, Helen Catanese, Andy An-I Wang Computer Science Department, Florida State university 1/12/2017

Background A file consists of two parts: metadata and data To access the data of a file, its metadata needs to be accessed first File Metadata Data Fast food example: Introduction Design Implementation Performance Conclusion

Linux Storage Stack VFS Block Layer Device Driver Storage Device Applications VFS ext4 FUSE Block Layer take out XFS btrfs entire stack Device Driver Storage Device

Background Virtual File System (VFS) provides a generalized, unique interface to application for file related operations. Read, write, open, close, … Benefits Same interface for different file systems DVD, HDD, thumb drive (flash, also known as SSD) Dispatches operations to file-system-specific routines Take out sync …. Introduction Design Implementation Performance Conclusion

Background Ext4 is the most commonly used local file system on Linux Derived from Ext3, with more advanced file system features such as extended attributes Performance is good on various workloads and different storage types (HDD, SSD) Merge Slide 5 and 6 if possible Introduction Design Implementation Performance Conclusion

Overview Current state Observations Composite-File File System (CFFS) One-to-one mapping of a logical file and its physical metadata (i-node) and data representations Observations Files are accessed in groups Tend to be small and share similar metadata Composite-File File System (CFFS) Many logical files can be consolidated into a single composite file with its shared metadata and representation Up 27% performance gain Introduction Design Implementation Performance Conclusion

Current State Each logical file is mapped to its physical metadata and data representations Deep-rooted data structures Natural granularity for many file system mechanisms VFS API, prefetching, etc. Suppose we relax this constraint Can we create new optimization opportunities? Prefetching: stop at the file boundary Storage -> memory Introduction Design Implementation Performance Conclusion

Observations Frequent accesses to small files Metadata a major source of overhead for small files (~40% slowdown) Redundant metadata information (e.g., file owner) Potential opportunities to consolidate Files accessed in groups Why physically represent them separately? Limitation of prefetching High per-file access overhead even with warm cache Warm cache: Introduction Design Implementation Performance Conclusion

i-node with consolidated metadata A Composite File file 1 i-node with consolidated metadata Subfile 1 Subfile 2 Subfile 3 file 2 data blocks data blocks data blocks file 3 Introduction Design Implementation Performance Conclusion

Metadata Design Highlights Upper bits Lower bits 00 1 01 10 11 Modified i-node numbers If number > X (e.g., 011) Treats zero-extended upper bits as i-node numbers Treats lower bits as subfile numbers Directory representation Names are mapped to modified i-node numbers Subfile’s metadata stored in extended attributes Permission: first check the permission of the composite file, then that of the target subfile Directory: folder

Subfile Operations Open/close Add a subfile Remove a subfile Open the composite file and seek to the offset of target subfile Close the entire composite file Add a subfile Append to the end Remove a subfile Mark it as freed Add: append is easier and files can grow Introduction Design Implementation Performance Conclusion

Subfile Operations (cont.) Read/write operation Read from the starting offset of the subfile, bounded by subfile size Write from the starting offset of the subfile, bounded by subfile size May move the entire subfile to the end if there is not enough space Space compaction When half of the space is marked as freed Introduction Design Implementation Performance Conclusion

Ways to Form Composite Files Directory-based consolidation Groups all files in one directory Embedded-reference-based consolidation Groups files based on the extracted references (e.g., URLs) Frequency-mining-based consolidation Based on variants of Apriori Algorithm Frequently encountered file request sequences must contain frequently encountered sub sequences Introduction Design Implementation Performance Conclusion

Directory-based Use smaller example

Embedded Links

Apriori Algorithm Proposed in 1994, used to discover frequent item set Uses a “bottom-up” approach, generates candidate item sets of length k from item sets of length k-1 Threshold can be set to filter results Introduction Design Implementation Performance Conclusion

Apriori example Per IP/PID Item sets {1,2,3,4} {1,2,4} {1,2} {2,3,4} {2,3} {3,4} {2,4} Item Support {1} 3 {2} 6 {3} 4 {4} 5 Input sequence 1, 2, 3, 4, 1, 2, 4, 1, 2, 2, 3, 4, 2, 3, 3, 4, 2, 4, … Min_support: 3 Stream requests -> IP and timestamps grouping Not good example Introduction Design Implementation Performance Conclusion

Apriori example Items Support {1,2} 3 {1,3} 1 {1,4} 2 {2,3} {2,4} 4 {3,4} Items Support {2,3,4} 2 Consistent color Introduction Design Implementation Performance Conclusion

Optimizations Form only non-overlapping sets Use sliding window to reduce memory requirement Use normalized threshold (support), between 0 and 1 Create composite-file layout based on the order of sub-file references Introduction Design Implementation Performance Conclusion

Comparison of three ways Directory-based consolidation Tends to have good prediction accuracy and least processing overhead Embedded-reference-based consolidation Tends to have the best prediction accuracy, needs to be aware of the content Frequency-mining-based consolidation Tends to have better prediction accuracy than first approach, but comes with higher processing overhead Introduction Design Implementation Performance Conclusion

Implementation Prototyped CFFS via FUSE+ext4 Intercepted file related system calls and performed the changes described in the design section Mapped multiple file names to the composite file i-node Used extended attributes to store consolidated metadata Other

FUSE File system in userspace (FUSE) is a framework that allows people to implement a file system in userspace Redirects the file related requests from VFS to the file system implementation in userspace Allows file system stacking Comes with performance overhead Talk about hard to develop in kernel level. Crash leads to reboot Introduction Design Implementation Performance Conclusion

FUSE look on glibc

CFFS Components Introduction Design Implementation Performance High contrast FUSE do the job, then pass to ext4 Introduction Design Implementation Performance Conclusion

System Configurations Platform Processor: 2.8GHz Intel Xeon E5 Memory: 2GB * 4, 1067MHz Hard Disk: 250GB, 7200 RPM Flash Disk: 200GB, Intel SSD Introduction Design Implementation Performance Conclusion

Workloads Web server trace Software development workstation 3-month long, 14 M references to 1TB of data (76GB unique) Create dummy file content Software development workstation 11-day long, 240M file-system-related system calls to 24GB of data (2.9GB unique) Local zero-think time replays Only replay open, close, read, write Number of unique bytes and references

Experimental Setups FUSE+CFFS+ext4 vs. FUSE+ext4 Various composite-file approaches Introduction Design Implementation Performance Conclusion

Web Server Latency HDD SSD Introduction Design Implementation Describe the graph: axis, latency, CDF, Introduction Design Implementation Performance Conclusion

Software Development Trace Replays Darker the color Explain Embedded-reference: scan valid files for references Confidence interval Introduction Design Implementation Performance Conclusion

Discussion CFFS can benefit both read-mostly and read-write workloads using HDDs and SSDs Performance gains are mostly from reduction of metadata IOs (~20%) Performance gain from modified data layout is about 10% Directory and embedded-reference-based schemes incur an initial deployment cost Overhead for frequency-mining-based scheme is offset from the performance gain Explain the overhead of frequency-mining-based scheme Introduction Design Implementation Performance Conclusion

Conclusion CFFS decouples the one-to-one mapping of files and metadata Increases throughput up to 27% Reduces latency up to 20% The CFFS approach is promising Introduction Design Implementation Performance Conclusion