Operating Systems ECE344 Lecture 11: SSD Ding Yuan

Slides:



Advertisements
Similar presentations
Chapter 12: File System Implementation
Advertisements

Concepts about the file system 2. The disk structure 3. Files in disk – The ext2 FS 4. The Virtual File System (c) 2013, Prof. Jordi Garcia.
File Systems.
File Systems Examples.
The design and implementation of a log-structured file system The design and implementation of a log-structured file system M. Rosenblum and J.K. Ousterhout.
File System Implementation CSCI 444/544 Operating Systems Fall 2008.
Avishai Wool lecture Introduction to Systems Programming Lecture 8.3 Non-volatile Memory Flash.
Ceng Operating Systems
1 File Management in Representative Operating Systems.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
Log-Structured File System (LFS) Review Session May 19, 2014.
File Systems. Main Points File layout Directory layout.
Solid State Drive Feb 15. NAND Flash Memory Main storage component of Solid State Drive (SSD) USB Drive, cell phone, touch pad…
Operating Systems ECE344 Ding Yuan File System Lecture 11: File System.
File Systems (1). Readings r Silbershatz et al: 10.1,10.2,
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Storage Systems: Advanced Topics Learning Objectives: To understand major characteristics of SSD To understand Logical Volume Management – its motivations.
Flashing Up the Storage Layer I. Koltsidas, S. D. Viglas (U of Edinburgh), VLDB 2008 Shimin Chen Big Data Reading Group.
Chapter 10 Storage and File Structure Yonsei University 2 nd Semester, 2013 Sanghyun Park.
File System Implementation Chapter 12. File system Organization Application programs Application programs Logical file system Logical file system manages.
OSes: 11. FS Impl. 1 Operating Systems v Objectives –discuss file storage and access on secondary storage (a hard disk) Certificate Program in Software.
The Design and Implementation of Log-Structure File System M. Rosenblum and J. Ousterhout.
26-Oct-15CSE 542: Operating Systems1 File system trace papers The Design and Implementation of a Log- Structured File System. M. Rosenblum, and J.K. Ousterhout.
1 File Systems: Consistency Issues. 2 File Systems: Consistency Issues File systems maintains many data structures  Free list/bit vector  Directories.
COMP25212 STORAGE SYSTEM AND VIRTUALIZATION Sergio Davies Feb/Mar 2014COMP25212 – Storage 3.
Log-Structured File Systems
CS 153 Design of Operating Systems Spring 2015 Lecture 22: File system optimizations.
CS 153 Design of Operating Systems Spring 2015 Lecture 21: File Systems.
Fast File System 2/17/2006. Introduction Paper talked about changes to old BSD 4.2 File System (FS) Motivation - Applications require greater throughput.
12/18/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam.
Local Filesystems (part 1) CPS210 Spring Papers  The Design and Implementation of a Log- Structured File System  Mendel Rosenblum  File System.
Lecture 10 Page 1 CS 111 Summer 2013 File Systems Control Structures A file is a named collection of information Primary roles of file system: – To store.
IT 344: Operating Systems Winter 2008 Module 15 BSD UNIX Fast File System Chia-Chi Teng CTB 265.
CSE 451: Operating Systems Spring 2012 Module 16 BSD UNIX Fast File System Ed Lazowska Allen Center 570.
Lecture 22 SSD. LFS review Good for …? Bad for …? How to write in LFS? How to read in LFS?
Chapter 6 File Systems. Essential requirements 1. Store very large amount of information 2. Must survive the termination of processes persistent 3. Concurrent.
Review CS File Systems - Partitions What is a hard disk partition?
Embedded System Lab. 정영진 The Design and Implementation of a Log-Structured File System Mendel Rosenblum and John K. Ousterhout ACM Transactions.
File Systems.  Issues for OS  Organize files  Directories structure  File types based on different accesses  Sequential, indexed sequential, indexed.
Transactional Flash V. Prabhakaran, T. L. Rodeheffer, L. Zhou (MSR, Silicon Valley), OSDI 2008 Shimin Chen Big Data Reading Group.
Lecture Topics: 11/22 HW 7 File systems –block allocation Unix and NT –disk scheduling –file caches –RAID.
 The emerged flash-memory based solid state drives (SSDs) have rapidly replaced the traditional hard disk drives (HDDs) in many applications.  Characteristics.
CPSC 426: Building Decentralized Systems Persistence
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 12: File System Implementation.
COS 518: Advanced Computer Systems Lecture 8 Michael Freedman
Storage Devices CS 161: Lecture 11 3/21/17.
File System Examples Unix Fast File System (FFS)
Today topics: File System Implementation
FileSystems.
File System Structure How do I organize a disk into a file system?
Filesystems.
File Processing : Storage Media
Chapter 11: File System Implementation
File Systems Kanwar Gill July 7, 2015.
Filesystems 2 Adapted from slides of Hank Levy
COS 518: Advanced Computer Systems Lecture 8 Michael Freedman
File Processing : Storage Media
Introduction to Operating Systems
CSE 451: Operating Systems Autumn 2004 BSD UNIX Fast File System
Log-Structured File Systems
M. Rosenblum and J.K. Ousterhout The design and implementation of a log-structured file system Proceedings of the 13th ACM Symposium on Operating.
Log-Structured File Systems
CSE 451: Operating Systems Winter Module 15 BSD UNIX Fast File System
Chapter 14: File-System Implementation
CSE 451: Operating Systems Autumn 2009 Module 17 Berkeley Log-Structured File System Ed Lazowska Allen Center
Log-Structured File Systems
SE350: Operating Systems Lecture 12: File Systems.
COS 518: Advanced Computer Systems Lecture 9 Michael Freedman
CS 295: Modern Systems Storage Technologies Introduction
Log-Structured File Systems
Presentation transcript:

Operating Systems ECE344 Lecture 11: SSD Ding Yuan © 2016-2017 DING YUAN ALL RIGHTS RESERVED

Fundamental Limitation with HD Mechanical Cannot be made too fast Latency in milliseconds © 2016-2017 DING YUAN ALL RIGHTS RESERVED

Solid-State Drive (SSD) Nonvolatile memory This gives the device the “solid-state” name Most common media: NAND Flash memory (Floating- gate transistors) © 2016-2017 DING YUAN ALL RIGHTS RESERVED

SSD: 2013 - 2015 Intel 520 Cherryville (2013) Samsung 850 (2015) Capacity: 1TB Sequential R/W: 540/520 MB/s Latency N/A $0.5/GB ($0.2/GB today) Intel 520 Cherryville (2013) Capacity: 240 GB Compare to HD: TB Sequential R/W: 550/520 MB/s Compare to HD: 122 MB/s Latency Read: 0.04 ms Write: 0.2 ms Compare to HD: tens of ms $1/GB Compare to HD: 0.06/GB © 2016-2017 DING YUAN ALL RIGHTS RESERVED

Limitations of SSD Random write performance Burnout For write, need to first erase a large of pages (32-64 pages), and reprogram Burnout Each cell has limited erase/program cycles Range from 1,000 – 100,000 writes © 2016-2017 DING YUAN ALL RIGHTS RESERVED

How do SSD’s characteristics impact FS design? Characteristics of SSD No mechanical components --- data location won’t make difference Random write performance is BAD Limited “write” cycles for each cell Optimizations on data location are no longer useful Avoid random writes! Spread the writes across the entire SSD © 2016-2017 DING YUAN ALL RIGHTS RESERVED

Don’t clap. Emphasize by *slow* Put a pause after each word --- when I speak fast, some words become inaudible And also speak up on every word… Transition --- go slow on them! How Sim---ple testing, pause, don’t strike! Java specific; Abort on over-catch; These systems are reliable’ debug the scripts, get rid of unnecessary words. Embarrasingly simple tool top-down vs. bottom-up? Bad practice --- really conservative. FP? In this talk I will describe a thorough analysis of hundreds of real-world failures in distributed system which gave us three findings: numbers? say #? or majority, vast majority? Too many numbers!! top-down vs. bottom-up --- not clear code review. connections btw. the components. emphasize on this in summary. Unexpected fun in this project

Log-structured File System New physical layout Logical organization remains the same, i.e., inode Motivations I/O traffic dominated by writes Reads are cached by memory Sequential access is faster than random access on H.D. © 2016-2017 DING YUAN ALL RIGHTS RESERVED

Core Ideas Treat hard drive like a log Append only No in-place update Buffer multiple small writes into a single large write What about read? Who cares, cached anyway  © 2016-2017 DING YUAN ALL RIGHTS RESERVED

Unix Inodes Unix inodes implement an indexed structure for files Each file or directory has one inode Also store metadata info (protection, timestamps, length, ref count…) Each inode contains 15 block pointers First 12 are direct blocks (e.g., 4 KB blocks) Then single, double, and triple indirect (Metadata) 1 … … 12 (1) 13 (2) 14 (3) … … © 2016-2017 DING YUAN ALL RIGHTS RESERVED

Example: read /var/log/syslog inode 2: / inode 3512: /var usr 2783 var 3512 .. .. inode 5193: /var/log inode 6264: /var/log/syslog log 5193 lib 5728 .. .. … data content (first 4 KB) .. .. syslog 6264 dmesg 2832 .. .. data content (2nd 4 KB) .. .. © 2016-2017 DING YUAN ALL RIGHTS RESERVED

Example: create a file dir/file1 Assume dir1 already exists inode 45: dir1/ inode 45: dir1/ Before After inode 86: dir1/file1 file0 83 file1 86 .. .. file0 83 .. .. 2 5 .. .. 2 7 … … 8 .. .. inode # disk addr 45 1 4 86 6 inode # disk addr 45 1 garbage disk addr. : 0 1 2 3 4 5 6 7 8 9 disk addr. : 0 1 2 3 4 5 6 7 8 9 © 2016-2017 DING YUAN ALL RIGHTS RESERVED

Garbage Collection Can quickly run out of disk space Constantly collect garbage But GC is very complicated and can cause significant perf. degradation (up to 40%) Similar to GC pause in today’s runtimes (e.g., JVM) Before GC After GC segment segment segment segment disk addr. : 0 1 2 3 4 5 6 7 8 9 disk addr. : 0 1 2 3 4 5 6 7 8 9 garbage in-use free © 2016-2017 DING YUAN ALL RIGHTS RESERVED

Checkpoint & Rollback Very easy b/c there is no in-place update! Each inode map is a snapshot! inode 45: dir1/ Before After inode 86: dir1/file1 file0 83 file1 86 .. .. file0 83 .. .. 2 5 .. .. 2 7 … … 8 .. .. inode # disk addr 45 1 4 86 6 inode # disk addr 45 1 disk addr. : 0 1 2 3 4 5 6 7 8 9 disk addr. : 0 1 2 3 4 5 6 7 8 9 © 2016-2017 DING YUAN ALL RIGHTS RESERVED

SSD:Desirable features from file systems Characteristics of SSD No mechanical components --- data location won’t make difference Random write performance is BAD On every write, a large segment needs to be reprogrammed anyway Limited “write” cycles for each cell Optimizations on data location are no longer useful Avoid random writes! GC is “free”!!! Spread the writes across the entire SSD © 2016-2017 DING YUAN ALL RIGHTS RESERVED

Log-structured File System on SSD Many popular Flash File Systems are log-structured File System Linux JFFS/JFFS2/YAFFS/LogFS… Vendors implement log-structured FS in their firmware! © 2016-2017 DING YUAN ALL RIGHTS RESERVED