Improving JFFS2 RAM usage and performance ELC Europe 2007 Alexey Korolev.

Slides:



Advertisements
Similar presentations
The Linux Kernel: Memory Management
Advertisements

Kernel memory allocation
Chapter 12. Kernel Memory Allocation
File Systems.
KERNEL MEMORY ALLOCATION Unix Internals, Uresh Vahalia Sowmya Ponugoti CMSC 691X.
Chapter 11: File System Implementation
File System Implementation
File System Implementation
Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous.
Operating Systems File Systems (in a Day) Ch
Embedded Real-Time Systems Design Selecting memory.
04/05/2004CSCI 315 Operating Systems Design1 File System Implementation.
Seafile - Scalable Cloud Storage System
File System Implementation
04/07/2010CSCI 315 Operating Systems Design1 File System Implementation.
Lecture 7 Lecture 7: Hardware/Software Systems on the XUP Board ECE 412: Microcomputer Laboratory.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Responsive Web Design Design websites so that they can adapt to different devices seamlessly. Image by Muhammed RafizeldiMuhammed Rafizeldi.
Virtual Memory By: Dinouje Fahih. Definition of Virtual Memory Virtual memory is a concept that, allows a computer and its operating system, to use a.
Solid State Drive Feb 15. NAND Flash Memory Main storage component of Solid State Drive (SSD) USB Drive, cell phone, touch pad…
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
File System. NET+OS 6 File System Architecture Design Goals File System Layer Design Storage Services Layer Design RAM Services Layer Design Flash Services.
© 2011 IBM Corporation 11 April 2011 IDS Architecture.
File Systems (1). Readings r Silbershatz et al: 10.1,10.2,
Joel Bapaga on Web Design Strategies Technologies Commercial Value.
File system support on Multi Level Cell (MLC) flash in open source April 17, 2008 Kyungmin Park Software Laboratories Samsung Electronics.
Flashing Up the Storage Layer I. Koltsidas, S. D. Viglas (U of Edinburgh), VLDB 2008 Shimin Chen Big Data Reading Group.
Operating Systems CMPSC 473 I/O Management (4) December 09, Lecture 25 Instructor: Bhuvan Urgaonkar.
Palm OS Jeremy Etzkorn Paul Rutschky Adam Lee Amit Bhatia Tony Picarazzi.
Seminar on Linux-based embedded systems
Motivation SSDs will become the primary storage devices on PC, but NTFS behavior may not suitable to flash memory especially on metadata files. When considering.
File Systems in Real-Time Embedded Applications March 4th Eric Julien Introduction to File Systems 1.
File System Implementation Chapter 12. File system Organization Application programs Application programs Logical file system Logical file system manages.
Chapter 5 File Management File System Implementation.
1 Linux Operating System 許 富 皓. 2 Memory Addressing.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 12: File System Implementation File System Structure File System Implementation.
File System Implementation
CS 153 Design of Operating Systems Spring 2015 Lecture 21: File Systems.
12.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 12: File System Implementation Chapter 12: File System Implementation.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 11: File System Implementation Chapter.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 12: File System Implementation File System Structure File System Implementation.
Operating Systems CMPSC 473 I/O Management (3) December 07, Lecture 24 Instructor: Bhuvan Urgaonkar.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Virtual Memory Hardware.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File System Implementation.
MultiJob pilot on Titan. ATLAS workloads on Titan Danila Oleynik (UTA), Sergey Panitkin (BNL) US ATLAS HPC. Technical meeting 18 September 2015.
CS333 Intro to Operating Systems Jonathan Walpole.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 11: File System Implementation.
11.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 11.5 Free-Space Management Bit vector (n blocks) … 012n-1 bit[i] =  1  block[i]
CS 241 Discussion Section (12/1/2011). Tradeoffs When do you: – Expand Increase total memory usage – Split Make smaller chunks (avoid internal fragmentation)
FILE SYSTEM IMPLEMENTATION 1. 2 File-System Structure File structure Logical storage unit Collection of related information File system resides on secondary.
Part IVI/O Systems Chapter 13: I/O Systems. I/O Hardware a typical PCI bus structure 2.
Benefiting government, industry and the public through innovative science and technology A Simple Flash File System For Embedded Space Applications October.
Transactional Flash V. Prabhakaran, T. L. Rodeheffer, L. Zhou (MSR, Silicon Valley), OSDI 2008 Shimin Chen Big Data Reading Group.
XIP – eXecute In Place Jiyong Park. 2 Contents Flash Memory How to Use Flash Memory Flash Translation Layers (Traditional) JFFS JFFS2 eXecute.
Lecture 01: Computer Architecture overview. Our Goals ● Have a better understanding of computer architecture – Write better (more efficient) programs.
Application development & MHL. Developing Morphic Morphic & charger with USB cable –USB driver (download from the web) Development Environment: Visual.
1 load [2], [9] Transfer contents of memory location 9 to memory location 2. Illegal instruction.
File System Implementation
Memory Management.
Jonathan Walpole Computer Science Portland State University
Penguin Weight Watchers
Operating Systems ECE344 Lecture 11: SSD Ding Yuan
Influence of Cheap and Fast NVRAM on Linux Kernel Architecture
Optimizing Malloc and Free
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Virtual Memory Hardware
Overview: File system implementation (cont)
Chapter 4 Introduction to Computer Organization
Buddy Allocation CS 161: Lecture 5 2/11/19.
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Improving JFFS2 RAM usage and performance ELC Europe 2007 Alexey Korolev

Verdana regular 7pt. Legal text goes here Flash Products Group Agenda JFFS2 in brief JFFS2 efficiency on large volumes –Market data on flash densities –Volume size test data –Why JFFS2 is inefficient on large volumes Improving JFFS2 RAM usage and performance within existing architecture –Proposed improvement –File direct I/O as a fast solution to reduce RAM usage and increase performance –Test data –Requirements and limitations –Current status and availability –Deferred write and JFFS2 RAM buffer as a RAM usage reduction prototype Q&A

Verdana regular 7pt. Legal text goes here Flash Products Group JFFS2 in brief Journaling Flash File System version 2 Supported in Linux for years since Works with NOR, NOR-ECC, NOR with programming regions, NAND and Dataflash Widely used in many configurations to provide FS interface to memory technology devices.

Verdana regular 7pt. Legal text goes here Flash Products Group Forecasted Flash Densities NOR NAND Cellular Handsets Forecasted NOR and NAND Densities in MB

Verdana regular 7pt. Legal text goes here Flash Products Group Volume size test data Volume used size (MB) JFFS2 RAM usage (MB)

Verdana regular 7pt. Legal text goes here Flash Products Group Volume size test data File size (MB) File open time (sec)

Verdana regular 7pt. Legal text goes here Flash Products Group Why Does JFFS2 Become Inefficient on Large Data Volumes? JFFS2 assumes keeping nodes (fragment) descriptions in memory since the moment of getting file info. 1.JFFS2 RAM usage increases linearly as the number of nodes increases (Every data node takes 40bytes of RAM) 2.If a file has many fragments, file open time increases significantly because JFFS2 needs to read every header from flash This is the architectural scalability issue of JFFS2 It is not possible to completely solve it without a complete file system redesign, however there are workarounds

Verdana regular 7pt. Legal text goes here Flash Products Group Improving RAM Usage and File Open Time Within Existing JFFS2 Architecture Our approach to reducing RAM usage and decreasing file open time is conceptually simple (but effective): Reduce the number of JFFS2 fragments Let’s look at how this can be done…

Flash Products Group Using File Direct I/O to Reduce RAM Usage and Increase Performance Lets look at the file write procedure Application requests to write data VFSVFS 64KB JFFS2 file_ops.write() do_sync_write() add to VFS pg cache JFFS2 write_page() 0-4KB 4-8KB…56-64KB 16 requests 16 fragments

Flash Products Group Using File Direct I/O to Reduce RAM Usage and Increase Performance One way to reduce number of nodes (fragments) is to provide direct file IO interface support in JFFS2 and increase JFFS2 granularity Application requests to write data VFSVFS 64KB JFFS2 file_ops.write() Write one fragment of data

Verdana regular 7pt. Legal text goes here Flash Products Group Test Results JFFS2 RAM Usage for Different Volume Sizes Volume Size JFFS2 RAM usage (MB) 3.5X

Verdana regular 7pt. Legal text goes here Flash Products Group Test Results Stat Time Performance for Different File Sizes File Size (MB) Stat Time(sec) >4X

Verdana regular 7pt. Legal text goes here Flash Products Group Requirements and Limitations Application should write data in large chunks If applications write data in small chunks, fragments won’t be combined until garbage collector touches it This model not effective if there are tons of tiny files Avoiding VFS page cache use could have positive and negative consequences Using the file open flag is recommended* For media files it avoids wasting page cache space and this could positively affect on system performance For databases, logs, and documents, using the page cache is highly recommended * We have patch providing reading through VFS cache while direct write

Verdana regular 7pt. Legal text goes here Flash Products Group Current status and availability The File direct I/O feature is ready for use (Linux ) It can be downloaded from The patch size is <50Kb and can be easily ported to other JFFS2 versions

Verdana regular 7pt. Legal text goes here Flash Products Group Deferred Write and RAM Buffer as a RAM Usage Reduction Prototype Application requests to write data VFSVFS 6KB JFFS2 file_ops.write() do_sync_write() JFFS2 Write RAM buffer 4KB 2KB 1KB … Merge nodes Large chunks Sync() JFFS2 flush RAM buffer 1KB 4KB … Compared to Direct IO, deferred write is effective even if applications write data in small chunks.

Verdana regular 7pt. Legal text goes here Flash Products Group 16 Conclusion Patches to provide Direct I/O in JFFS2 are ready + Significantly reduce RAM usage and open time + Easy applicable - Has restrictions on large write chunks

Intel Confidential Flash Products Group 17 Q & A Questions ? Link: mailto: