The Btrfs Filesystem

Total Page:16

File Type:pdf, Size:1020Kb

The Btrfs Filesystem O The Btrfs Filesystem Chris Mason Oracle Sept 2007 Chris Mason The Btrfs Filesystem O Topics Chris Mason The Btrfs Filesystem O Storage Drives are getting bigger, but not much faster File sizes are often small Fsck times can be very large Filesystem scaling issues I Performance I Management I Space utilization Chris Mason The Btrfs Filesystem O A New Filesystem? Existing filesystems not well suited Disk format compatibility Upstream integration Chris Mason The Btrfs Filesystem O Btrfs Design Extent based file storage Space efficient packing of small files Space efficient indexed directories Integrity checksumming (data and metadata) Writable snapshots Efficient incremental backups Object level striping and mirroring Online filesystem check Chris Mason The Btrfs Filesystem O Btrfs Btree Basics Simple copy on write tree Reference counting for filesystem trees Everything stored as a key/value pair Large file data extents stored outside the tree Defragments before writeback and via an ioctl Btree blocks allocated from metadata-only block groups Chris Mason The Btrfs Filesystem O Btrfs Trees Super Root Tree Directory items . Extent Root Subvolume 'default' Snapshot 'snap' .. Pointer Pointer Pointer default snap Extent Tree Subvolume Tree Block allocation Files and Information and Directories Reference Counts Chris Mason The Btrfs Filesystem O Btrfs Files Small files stored inside the btree (inline) Large files stored in large extents Written via delayed allocation Variable sized checksums stored in the btree Chris Mason The Btrfs Filesystem O Btrfs Directories Double indexed by name and inode number Compact: space reclaimed as names are removed Backpointers from the file to the directory Used to implement xattrs Chris Mason The Btrfs Filesystem O Directory Layout Benchmarks Create one million files in a single directory (512 bytes or 16k) Time find, backup and delete operations Chris Mason The Btrfs Filesystem Disk IO Ext3 Read 28005 Ext3 Write XFS Read XFS Write 21004 Btrfs Read Btrfs Write 14002 7001 Disk offset (MB) 0 120 Seek Count 90 Ext3 XFS Btrfs 60 30 Seeks / sec 0 45 Throughput 33 Ext3 XFS Btrfs 22 MB/s 11 0 0 68 137 206 275 344 412 481 550 Time (seconds) Figure: Create one million 512 byte files 24004 Disk IO Ext3 Read 18003 Ext3 Write Btrfs Read Btrfs Write 12002 6001 Disk offset (MB) 0 160 Seek Count 120 Ext3 Btrfs 80 40 Seeks / sec 0 50 Throughput 37 Ext3 Btrfs 25 MB/s 12 0 0 14 28 42 56 70 84 98 112 Time (seconds) Figure: Create one million 512 byte files Disk IO 27330 Ext3 Read Ext3 Write XFS Read 20497 XFS Write Btrfs Read 13665 6832 Disk offset (MB) 0 250 Seek Count 187 Ext3 XFS Btrfs 125 62 Seeks / sec 0 30 Throughput 22 Ext3 XFS Btrfs 15 MB/s 7 0 0 6 12 19 25 32 38 44 51 Time (seconds) Figure: Find one million 512 byte files 27330 Disk IO XFS Read 20497 XFS Write Btrfs Read Btrfs Write 13665 6832 Disk offset (MB) 0 350 Seek Count 262 XFS Btrfs 175 87 Seeks / sec 0 20 Throughput 15 XFS Btrfs 10 MB/s 5 0 0 44 89 134 179 224 269 314 359 Time (seconds) Figure: Read one million 512 byte files O Btrfs Snapshots Subvolume trees and file extents are reference counted Snapshots are writable and can be snapshotted again Root Node Root Node Cow Root Ref: 1 Ref: 1 Ref: 1 Leaf 1 Leaf 2 Leaf 3 Leaf 1 Leaf 2 Leaf 3 Ref: 1 Ref: 1 Ref: 1 Ref: 2 Ref: 2 Ref: 2 Figure: Before COW Figure: After COW Chris Mason The Btrfs Filesystem O Btrfs Snapshots Transactions are snapshots that are deleted after commit Root Node Cow Root New Root Ref: 1 Ref: 1 Ref: 1 Leaf 1 Leaf 2 Leaf 3 Leaf 2 Leaf 3 Ref: 1 Ref: 2 Ref: 2 Ref: 1 Ref: 1 Figure: Modification after COW Figure: After Deletion Chris Mason The Btrfs Filesystem O Btrfs Allocation Trees Will help model underlying storage (DM integration) Record reference counts for all extents Contain resizable block groups Btrees can pull from one or more allocation trees Chris Mason The Btrfs Filesystem O Btrfs Benchmarking Single threaded, focus on layout mkfs.xfs -d agcount=3 -l version=2,logsize=128m mount -t xfs -o logbsize=256k mount -t ext3 -o data=writeback Single SATA drive, no barriers used atimes left on Graphs from http://oss.oracle.com/∼mason/seekwatcher Chris Mason The Btrfs Filesystem Disk IO Ext3 Read 30510 Ext3 Write XFS Read XFS Write 22882 Btrfs Read Btrfs Write 15255 7627 Disk offset (MB) 0 120 Seek Count 90 Ext3 XFS Btrfs 60 30 Seeks / sec 0 50 Throughput 37 Ext3 XFS Btrfs 25 MB/s 12 0 0 110 220 331 441 552 662 772 883 Time (seconds) Figure: Create one million 16 KB files 30510 Disk IO Ext3 Read 22882 Ext3 Write Btrfs Read Btrfs Write 15255 7627 Disk offset (MB) 0 45 Seek Count 33 Ext3 Btrfs 22 11 Seeks / sec 0 50 Throughput 37 Ext3 Btrfs 25 MB/s 12 0 0 54 108 162 216 270 324 378 432 Time (seconds) Figure: Create one million 16 KB files Disk IO 27425 Ext3 Read Ext3 Write XFS Read 20569 XFS Write Btrfs Read 13712 6856 Disk offset (MB) 0 250 Seek Count 187 Ext3 XFS Btrfs 125 62 Seeks / sec 0 20 Throughput 15 Ext3 XFS Btrfs 10 MB/s 5 0 0 6 12 18 24 30 36 42 48 Time (seconds) Figure: Find one million 16 KB files 29756 Disk IO XFS Read 22317 XFS Write Btrfs Read Btrfs Write 14878 7439 Disk offset (MB) 0 160 Seek Count 120 XFS Btrfs 80 40 Seeks / sec 0 35 Throughput 26 XFS Btrfs 17 MB/s 8 0 0 114 228 342 456 570 684 799 913 Time (seconds) Figure: Read one million 16 KB files O Compilebench Simulates operations on kernel trees File sizes and names collected from real kernel trees Randomly create, compile, patch, clean, delete Intended to age and fragment the FS Created 90 initial trees and ran 150 operations http://oss.oracle.com/∼mason/compilebench Chris Mason The Btrfs Filesystem O Compilebench Btrfs Ext3 XFS Initial Create 33.78 MB/s 10.31 MB/s 15.30 MB/s Create 14.39 MB/s 12.47 MB/s 8.94 MB/s Patch 3.77 MB/s 4.48 MB/s 3.19 MB/s Compile 20.56 MB/s 15.28 MB/s 21.61 MB/s Clean 69.96 MB/s 43.84 MB/s 134.15 MB/s Read 5.37 MB/s 8.66 MB/s 7.05 MB/s Read Compiled 11.31 MB/s 13.22 MB/s 14.40 MB/s Delete 15.77s 18.34s 16.63s Delete Compiled 22.96s 33.35s 21.38s Stat 15.86s 11.35s 7.25s Stat Compiled 21.82s 14.17s 8.99s Chris Mason The Btrfs Filesystem Disk IO Ext3 Read 34614 Ext3 Write XFS Read XFS Write 25960 Btrfs Read Btrfs Write 17307 8653 Disk offset (MB) 0 300 Seek Count 225 Ext3 XFS Btrfs 150 75 Seeks / sec 0 50 Throughput 37 Ext3 XFS Btrfs 25 MB/s 12 0 0 37 74 111 148 185 223 260 297 Time (seconds) Figure: Create 20 kernel trees Disk IO Ext3 Read 40934 Ext3 Write XFS Read XFS Write 30700 Btrfs Read Btrfs Write 20467 10233 Disk offset (MB) 0 250 Seek Count 187 Ext3 XFS Btrfs 125 62 Seeks / sec 0 35 Throughput 26 Ext3 XFS Btrfs 17 MB/s 8 0 0 96 192 288 384 480 576 672 769 Time (seconds) Figure: Make -j simulated 20 kernel trees Disk IO Ext3 Read 40933 Ext3 Write XFS Read XFS Write 30700 Btrfs Read Btrfs Write 20466 10233 Disk offset (MB) 0 180 Seek Count 135 Ext3 XFS Btrfs 90 45 Seeks / sec 0 25 Throughput 18 Ext3 XFS Btrfs 12 MB/s 6 0 0 61 122 184 245 307 368 429 491 Time (seconds) Figure: Delete 20 kernel trees O TODO Concurrency (tree locking) Multiple extent allocation trees OSYNC and fsync performance Online fsck Many many more Chris Mason The Btrfs Filesystem.
Recommended publications
  • The Kernel Report
    The kernel report (ELC 2012 edition) Jonathan Corbet LWN.net [email protected] The Plan Look at a year's worth of kernel work ...with an eye toward the future Starting off 2011 2.6.37 released - January 4, 2011 11,446 changes, 1,276 developers VFS scalability work (inode_lock removal) Block I/O bandwidth controller PPTP support Basic pNFS support Wakeup sources What have we done since then? Since 2.6.37: Five kernel releases have been made 59,000 changes have been merged 3069 developers have contributed to the kernel 416 companies have supported kernel development February As you can see in these posts, Ralink is sending patches for the upstream rt2x00 driver for their new chipsets, and not just dumping a huge, stand-alone tarball driver on the community, as they have done in the past. This shows a huge willingness to learn how to deal with the kernel community, and they should be strongly encouraged and praised for this major change in attitude. – Greg Kroah-Hartman, February 9 Employer contributions 2.6.38-3.2 Volunteers 13.9% Wolfson Micro 1.7% Red Hat 10.9% Samsung 1.6% Intel 7.3% Google 1.6% unknown 6.9% Oracle 1.5% Novell 4.0% Microsoft 1.4% IBM 3.6% AMD 1.3% TI 3.4% Freescale 1.3% Broadcom 3.1% Fujitsu 1.1% consultants 2.2% Atheros 1.1% Nokia 1.8% Wind River 1.0% Also in February Red Hat stops releasing individual kernel patches March 2.6.38 released – March 14, 2011 (9,577 changes from 1198 developers) Per-session group scheduling dcache scalability patch set Transmit packet steering Transparent huge pages Hierarchical block I/O bandwidth controller Somebody needs to get a grip in the ARM community.
    [Show full text]
  • Rootless Containers with Podman and Fuse-Overlayfs
    CernVM Workshop 2019 (4th June 2019) Rootless containers with Podman and fuse-overlayfs Giuseppe Scrivano @gscrivano Introduction 2 Rootless Containers • “Rootless containers refers to the ability for an unprivileged user (i.e. non-root user) to create, run and otherwise manage containers.” (https://rootlesscontaine.rs/ ) • Not just about running the container payload as an unprivileged user • Container runtime runs also as an unprivileged user 3 Don’t confuse with... • sudo podman run --user foo – Executes the process in the container as non-root – Podman and the OCI runtime still running as root • USER instruction in Dockerfile – same as above – Notably you can’t RUN dnf install ... 4 Don’t confuse with... • podman run --uidmap – Execute containers as a non-root user, using user namespaces – Most similar to rootless containers, but still requires podman and runc to run as root 5 Motivation of Rootless Containers • To mitigate potential vulnerability of container runtimes • To allow users of shared machines (e.g. HPC) to run containers without the risk of breaking other users environments • To isolate nested containers 6 Caveat: Not a panacea • Although rootless containers could mitigate these vulnerabilities, it is not a panacea , especially it is powerless against kernel (and hardware) vulnerabilities – CVE 2013-1858, CVE-2015-1328, CVE-2018-18955 • Castle approach : it should be used in conjunction with other security layers such as seccomp and SELinux 7 Podman 8 Rootless Podman Podman is a daemon-less alternative to Docker • $ alias
    [Show full text]
  • Dm-X: Protecting Volume-Level Integrity for Cloud Volumes and Local
    dm-x: Protecting Volume-level Integrity for Cloud Volumes and Local Block Devices Anrin Chakraborti Bhushan Jain Jan Kasiak Stony Brook University Stony Brook University & Stony Brook University UNC, Chapel Hill Tao Zhang Donald Porter Radu Sion Stony Brook University & Stony Brook University & Stony Brook University UNC, Chapel Hill UNC, Chapel Hill ABSTRACT on Amazon’s Virtual Private Cloud (VPC) [2] (which provides The verified boot feature in recent Android devices, which strong security guarantees through network isolation) store deploys dm-verity, has been overwhelmingly successful in elim- data on untrusted storage devices residing in the public cloud. inating the extremely popular Android smart phone rooting For example, Amazon VPC file systems, object stores, and movement [25]. Unfortunately, dm-verity integrity guarantees databases reside on virtual block devices in the Amazon are read-only and do not extend to writable volumes. Elastic Block Storage (EBS). This paper introduces a new device mapper, dm-x, that This allows numerous attack vectors for a malicious cloud efficiently (fast) and reliably (metadata journaling) assures provider/untrusted software running on the server. For in- volume-level integrity for entire, writable volumes. In a direct stance, to ensure SEC-mandated assurances of end-to-end disk setup, dm-x overheads are around 6-35% over ext4 on the integrity, banks need to guarantee that the external cloud raw volume while offering additional integrity guarantees. For storage service is unable to remove log entries documenting cloud storage (Amazon EBS), dm-x overheads are negligible. financial transactions. Yet, without integrity of the storage device, a malicious cloud storage service could remove logs of a coordinated attack.
    [Show full text]
  • ECE 598 – Advanced Operating Systems Lecture 19
    ECE 598 { Advanced Operating Systems Lecture 19 Vince Weaver http://web.eece.maine.edu/~vweaver [email protected] 7 April 2016 Announcements • Homework #7 was due • Homework #8 will be posted 1 Why use FAT over ext2? • FAT simpler, easy to code • FAT supported on all major OSes • ext2 faster, more robust filename and permissions 2 btrfs • B-tree fs (similar to a binary tree, but with pages full of leaves) • overwrite filesystem (overwite on modify) vs CoW • Copy on write. When write to a file, old data not overwritten. Since old data not over-written, crash recovery better Eventually old data garbage collected • Data in extents 3 • Copy-on-write • Forest of trees: { sub-volumes { extent-allocation { checksum tree { chunk device { reloc • On-line defragmentation • On-line volume growth 4 • Built-in RAID • Transparent compression • Snapshots • Checksums on data and meta-data • De-duplication • Cloning { can make an exact snapshot of file, copy-on- write different than link, different inodles but same blocks 5 Embedded • Designed to be small, simple, read-only? • romfs { 32 byte header (magic, size, checksum,name) { Repeating files (pointer to next [0 if none]), info, size, checksum, file name, file data • cramfs 6 ZFS Advanced OS from Sun/Oracle. Similar in idea to btrfs indirect still, not extent based? 7 ReFS Resilient FS, Microsoft's answer to brtfs and zfs 8 Networked File Systems • Allow a centralized file server to export a filesystem to multiple clients. • Provide file level access, not just raw blocks (NBD) • Clustered filesystems also exist, where multiple servers work in conjunction.
    [Show full text]
  • CS 5600 Computer Systems
    CS 5600 Computer Systems Lecture 10: File Systems What are We Doing Today? • Last week we talked extensively about hard drives and SSDs – How they work – Performance characterisEcs • This week is all about managing storage – Disks/SSDs offer a blank slate of empty blocks – How do we store files on these devices, and keep track of them? – How do we maintain high performance? – How do we maintain consistency in the face of random crashes? 2 • ParEEons and MounEng • Basics (FAT) • inodes and Blocks (ext) • Block Groups (ext2) • Journaling (ext3) • Extents and B-Trees (ext4) • Log-based File Systems 3 Building the Root File System • One of the first tasks of an OS during bootup is to build the root file system 1. Locate all bootable media – Internal and external hard disks – SSDs – Floppy disks, CDs, DVDs, USB scks 2. Locate all the parEEons on each media – Read MBR(s), extended parEEon tables, etc. 3. Mount one or more parEEons – Makes the file system(s) available for access 4 The Master Boot Record Address Size Descripon Hex Dec. (Bytes) Includes the starEng 0x000 0 Bootstrap code area 446 LBA and length of 0x1BE 446 ParEEon Entry #1 16 the parEEon 0x1CE 462 ParEEon Entry #2 16 0x1DE 478 ParEEon Entry #3 16 0x1EE 494 ParEEon Entry #4 16 0x1FE 510 Magic Number 2 Total: 512 ParEEon 1 ParEEon 2 ParEEon 3 ParEEon 4 MBR (ext3) (swap) (NTFS) (FAT32) Disk 1 ParEEon 1 MBR (NTFS) 5 Disk 2 Extended ParEEons • In some cases, you may want >4 parEEons • Modern OSes support extended parEEons Logical Logical ParEEon 1 ParEEon 2 Ext.
    [Show full text]
  • Ext4 File System and Crash Consistency
    1 Ext4 file system and crash consistency Changwoo Min 2 Summary of last lectures • Tools: building, exploring, and debugging Linux kernel • Core kernel infrastructure • Process management & scheduling • Interrupt & interrupt handler • Kernel synchronization • Memory management • Virtual file system • Page cache and page fault 3 Today: ext4 file system and crash consistency • File system in Linux kernel • Design considerations of a file system • History of file system • On-disk structure of Ext4 • File operations • Crash consistency 4 File system in Linux kernel User space application (ex: cp) User-space Syscalls: open, read, write, etc. Kernel-space VFS: Virtual File System Filesystems ext4 FAT32 JFFS2 Block layer Hardware Embedded Hard disk USB drive flash 5 What is a file system fundamentally? int main(int argc, char *argv[]) { int fd; char buffer[4096]; struct stat_buf; DIR *dir; struct dirent *entry; /* 1. Path name -> inode mapping */ fd = open("/home/lkp/hello.c" , O_RDONLY); /* 2. File offset -> disk block address mapping */ pread(fd, buffer, sizeof(buffer), 0); /* 3. File meta data operation */ fstat(fd, &stat_buf); printf("file size = %d\n", stat_buf.st_size); /* 4. Directory operation */ dir = opendir("/home"); entry = readdir(dir); printf("dir = %s\n", entry->d_name); return 0; } 6 Why do we care EXT4 file system? • Most widely-deployed file system • Default file system of major Linux distributions • File system used in Google data center • Default file system of Android kernel • Follows the traditional file system design 7 History of file system design 8 UFS (Unix File System) • The original UNIX file system • Design by Dennis Ritche and Ken Thompson (1974) • The first Linux file system (ext) and Minix FS has a similar layout 9 UFS (Unix File System) • Performance problem of UFS (and the first Linux file system) • Especially, long seek time between an inode and data block 10 FFS (Fast File System) • The file system of BSD UNIX • Designed by Marshall Kirk McKusick, et al.
    [Show full text]
  • W4118: Linux File Systems
    W4118: Linux file systems Instructor: Junfeng Yang References: Modern Operating Systems (3rd edition), Operating Systems Concepts (8th edition), previous W4118, and OS at MIT, Stanford, and UWisc File systems in Linux Linux Second Extended File System (Ext2) . What is the EXT2 on-disk layout? . What is the EXT2 directory structure? Linux Third Extended File System (Ext3) . What is the file system consistency problem? . How to solve the consistency problem using journaling? Virtual File System (VFS) . What is VFS? . What are the key data structures of Linux VFS? 1 Ext2 “Standard” Linux File System . Was the most commonly used before ext3 came out Uses FFS like layout . Each FS is composed of identical block groups . Allocation is designed to improve locality inodes contain pointers (32 bits) to blocks . Direct, Indirect, Double Indirect, Triple Indirect . Maximum file size: 4.1TB (4K Blocks) . Maximum file system size: 16TB (4K Blocks) On-disk structures defined in include/linux/ext2_fs.h 2 Ext2 Disk Layout Files in the same directory are stored in the same block group Files in different directories are spread among the block groups Picture from Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639 3 Block Addressing in Ext2 Twelve “direct” blocks Data Data BlockData Inode Block Block BLKSIZE/4 Indirect Data Data Blocks BlockData Block Data (BLKSIZE/4)2 Indirect Block Data BlockData Blocks Block Double Block Indirect Indirect Blocks Data Data Data (BLKSIZE/4)3 BlockData Data Indirect Block BlockData Block Block Triple Double Blocks Block Indirect Indirect Data Indirect Data BlockData Blocks Block Block Picture from Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
    [Show full text]
  • How UNIX Organizes and Accesses Files on Disk Why File Systems
    UNIX File Systems How UNIX Organizes and Accesses Files on Disk Why File Systems • File system is a service which supports an abstract representation of the secondary storage to the OS • A file system organizes data logically for random access by the OS. • A virtual file system provides the interface between the data representation by the kernel to the user process and the data presentation to the kernel in memory. The file and directory system cache. • Because of the performance disparity between disk and CPU/memory, file system performance is the paramount issue for any OS Main memory vs. Secondary storage • Small (MB/GB) Large (GB/TB) • Expensive Cheap -2 -3 • Fast (10-6/10-7 sec) Slow (10 /10 sec) • Volatile Persistent Cannot be directly accessed • Directly accessible by CPU by CPU – Interface: (virtual) memory – Data should be first address brought into the main memory Secondary storage (disk) • A number of disks directly attached to the computer • Network attached disks accessible through a fast network - Storage Area Network (SAN) • Simple disks (IDE, SATA) have a described disk geometry. Sector size is the minimum read/write unit of data (usually 512Bytes) – Access: (#surface, #track, #sector) • Smart disks (SCSI, SAN, NAS) hide the internal disk layout using a controller type function – Access: (#sector) • Moving arm assembly (Seek) is expensive – Sequential access is x100 times faster than the random access Internal disk structure • Disk structure User Process Accessing Data • Given the file name. Get to the file’s FCB using the file system catalog (Open, Close, Set_Attribute) • The catalog maps a file name to the FCB – Checks permissions • file_handle=open(file_name): – search the catalog and bring FCB into the memory – UNIX: in-memory FCB: in-core i-node • Use the FCB to get to the desired offset within the file data: (CREATE, DELETE, SEEK, TRUNCATE) • close(file_handle): release FCB from memory Catalog Organization (Directories) • In UNIX, special files (not special device files) called directories contain information about other files.
    [Show full text]
  • NOVA: a Log-Structured File System for Hybrid Volatile/Non
    NOVA: A Log-structured File System for Hybrid Volatile/Non-volatile Main Memories Jian Xu and Steven Swanson, University of California, San Diego https://www.usenix.org/conference/fast16/technical-sessions/presentation/xu This paper is included in the Proceedings of the 14th USENIX Conference on File and Storage Technologies (FAST ’16). February 22–25, 2016 • Santa Clara, CA, USA ISBN 978-1-931971-28-7 Open access to the Proceedings of the 14th USENIX Conference on File and Storage Technologies is sponsored by USENIX NOVA: A Log-structured File System for Hybrid Volatile/Non-volatile Main Memories Jian Xu Steven Swanson University of California, San Diego Abstract Hybrid DRAM/NVMM storage systems present a host of opportunities and challenges for system designers. These sys- Fast non-volatile memories (NVMs) will soon appear on tems need to minimize software overhead if they are to fully the processor memory bus alongside DRAM. The result- exploit NVMM’s high performance and efficiently support ing hybrid memory systems will provide software with sub- more flexible access patterns, and at the same time they must microsecond, high-bandwidth access to persistent data, but provide the strong consistency guarantees that applications managing, accessing, and maintaining consistency for data require and respect the limitations of emerging memories stored in NVM raises a host of challenges. Existing file sys- (e.g., limited program cycles). tems built for spinning or solid-state disks introduce software Conventional file systems are not suitable for hybrid mem- overheads that would obscure the performance that NVMs ory systems because they are built for the performance char- should provide, but proposed file systems for NVMs either in- acteristics of disks (spinning or solid state) and rely on disks’ cur similar overheads or fail to provide the strong consistency consistency guarantees (e.g., that sector updates are atomic) guarantees that applications require.
    [Show full text]
  • Oracle® Linux 7 Managing File Systems
    Oracle® Linux 7 Managing File Systems F32760-07 August 2021 Oracle Legal Notices Copyright © 2020, 2021, Oracle and/or its affiliates. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract.
    [Show full text]
  • Filesystem Considerations for Embedded Devices ELC2015 03/25/15
    Filesystem considerations for embedded devices ELC2015 03/25/15 Tristan Lelong Senior embedded software engineer Filesystem considerations ABSTRACT The goal of this presentation is to answer a question asked by several customers: which filesystem should you use within your embedded design’s eMMC/SDCard? These storage devices use a standard block interface, compatible with traditional filesystems, but constraints are not those of desktop PC environments. EXT2/3/4, BTRFS, F2FS are the first of many solutions which come to mind, but how do they all compare? Typical queries include performance, longevity, tools availability, support, and power loss robustness. This presentation will not dive into implementation details but will instead summarize provided answers with the help of various figures and meaningful test results. 2 TABLE OF CONTENTS 1. Introduction 2. Block devices 3. Available filesystems 4. Performances 5. Tools 6. Reliability 7. Conclusion Filesystem considerations ABOUT THE AUTHOR • Tristan Lelong • Embedded software engineer @ Adeneo Embedded • French, living in the Pacific northwest • Embedded software, free software, and Linux kernel enthusiast. 4 Introduction Filesystem considerations Introduction INTRODUCTION More and more embedded designs rely on smart memory chips rather than bare NAND or NOR. This presentation will start by describing: • Some context to help understand the differences between NAND and MMC • Some typical requirements found in embedded devices designs • Potential filesystems to use on MMC devices 6 Filesystem considerations Introduction INTRODUCTION Focus will then move to block filesystems. How they are supported, what feature do they advertise. To help understand how they compare, we will present some benchmarks and comparisons regarding: • Tools • Reliability • Performances 7 Block devices Filesystem considerations Block devices MMC, EMMC, SD CARD Vocabulary: • MMC: MultiMediaCard is a memory card unveiled in 1997 by SanDisk and Siemens based on NAND flash memory.
    [Show full text]
  • File Systems
    File Systems Profs. Bracy and Van Renesse based on slides by Prof. Sirer Storing Information • Applications could store information in the process address space • Why is this a bad idea? – Size is limited to size of virtual address space – The data is lost when the application terminates • Even when computer doesn’t crash! – Multiple process might want to access the same data File Systems • 3 criteria for long-term information storage: 1. Able to store very large amount of information 2. Information must survive the processes using it 3. Provide concurrent access to multiple processes • Solution: – Store information on disks in units called files – Files are persistent, only owner can delete it – Files are managed by the OS File Systems: How the OS manages files! File Naming • Motivation: Files abstract information stored on disk – You do not need to remember block, sector, … – We have human readable names • How does it work? – Process creates a file, and gives it a name • Other processes can access the file by that name – Naming conventions are OS dependent • Usually names as long as 255 characters is allowed • Windows names not case sensitive, UNIX family is File Extensions • Name divided into 2 parts: Name+Extension • On UNIX, extensions are not enforced by OS – Some applications might insist upon them • Think: .c, .h, .o, .s, etc. for C compiler • Windows attaches meaning to extensions – Tries to associate applications to file extensions File Access • Sequential access – read all bytes/records from the beginning – particularly convenient for magnetic tape • Random access – bytes/records read in any order – essential for database systems File Attributes • File-specific info maintained by the OS – File size, modification date, creation time, etc.
    [Show full text]