SlideShare a Scribd company logo
1 of 23
Download to read offline
Flash Introduction
                Logfs




 Brief Intro to Logfs

                 彭 涛
BUPT—Broadband Network Research Center




            Bergwolf    Flash Device and Logfs
Flash Introduction
                               Logfs


Contents



 1   Flash Introduction


 2   Logfs




                           Bergwolf    Flash Device and Logfs
Flash Introduction
                              Logfs




1   Flash Introduction

2   Logfs




                          Bergwolf    Flash Device and Logfs
Flash Introduction
                            Logfs


Characteristics


     No seek time
     Page: write granularity. 1 bit(NOR), 8-16
     bytes(ECCNOR), 256, 512 or 2048 bytes(NAND,
     AGAND)
     Erase block: usually a power of 2 from 32k to 256k.
     ECC(error checking and correction) is needed.




                        Bergwolf    Flash Device and Logfs
Flash Introduction
                            Logfs


Advantage


    Performance
    Reliability(people are advocating this, but evidences...
    :P)
    Power saving(citing Intel: 13% battery life extension
    is reported in SSD)




                        Bergwolf    Flash Device and Logfs
Flash Introduction
                            Logfs


Limitation


    Must be erased before rewritten: out of place
    updating
    Erase block larger than fs block: garbage collection
    Erase cycles(about 100,000 per erase block): wear
    leveling
    Others...(Like MLC NAND’s paired pages)




                        Bergwolf    Flash Device and Logfs
Flash Introduction
                              Logfs




1   Flash Introduction

2   Logfs




                          Bergwolf    Flash Device and Logfs
Flash Introduction
                           Logfs


Overview

    A flash filesystem for Linux working on top of MTD.
    A journaling filesystem.
    A log-structured filesystem.
    out of place updating: wandering tree
    Wear leveling: pre scanning and determining
    Garbage collection.
    MLC flash support (uncertain)...


                       Bergwolf    Flash Device and Logfs
Flash Introduction
                               Logfs


Log-structure layout



 Treats its storage as a circular log and writes sequentially
 to the head of the log.




                           Bergwolf    Flash Device and Logfs
Flash Introduction
                           Logfs


Log-structure layout(Cont.)

    Writes create multiple, chronologically-advancing
    versions of both file data and meta-data.
    Recovery from crashes is simpler. Upon its next
    mount, the file system can reconstruct its state from
    the last consistent point in the log.
    Free space must be constantly reclaimed from the tail
    of the log to prevent the file system from becoming
    full when the head of the log wraps around to meet it.



                       Bergwolf    Flash Device and Logfs
Flash Introduction
                            Logfs


Log-structure layout(Cont.)



    logfs devides the device into segments to avoid
    garbage collection IO overhead. See the gc slides.




                        Bergwolf    Flash Device and Logfs
Flash Introduction
                       Logfs


Wandering Tree




                 !@#$%


                   Bergwolf    Flash Device and Logfs
Flash Introduction
                              Logfs


Garbage Collection

 This is the reason why a flash filesystem is needed.
  FTL has to look into each fs’s internal structure to find
 out which block is in use and which is obsolete(due to file
 deletion). And I think this is where the rumor FTL is
 optimized for FAT filesystem comes from.




                          Bergwolf    Flash Device and Logfs
Flash Introduction
                              Logfs


Garbage Collection

 This is the reason why a flash filesystem is needed.
  FTL has to look into each fs’s internal structure to find
 out which block is in use and which is obsolete(due to file
 deletion). And I think this is where the rumor FTL is
 optimized for FAT filesystem comes from.

  A TRIM command is introduced into ATA specification,
 telling the underlying hardware a chunk of sectors is no
 longer need.




                          Bergwolf    Flash Device and Logfs
Flash Introduction
                              Logfs


Vim



 Old data recycled during gc operation is expected to be
 long-lived. New data is of uncertain life expectancy. New
 data used to replace older blocks in existing files is
 expected to be short-lived.




                          Bergwolf    Flash Device and Logfs
Flash Introduction
                               Logfs


Vim (Cont.)


 By cleverly predicting the life time of data, it is possible to
 seperate long-living data from short-living data and
 thereby reduce the GC overhead later. Each type of distinc
 life expectency (vim) can have a seperate segment open for
 writing. Each (level, vim) tupel can be open just once. If
 an open segment with unknown vim is encountered at
 mount time, it is closed and ignored henceforth.




                           Bergwolf    Flash Device and Logfs
Flash Introduction
                               Logfs


Inode File



 All inodes are stored in a special file, the inode file. Single
 exception is the inode file’s inode (master inode) which for
 obvious reasons is stored in the journal instead. Instead of
 data blocks, the leaf nodes of the inode files are inodes.




                           Bergwolf    Flash Device and Logfs
Flash Introduction
                              Logfs


Object Store


 All space except for the superblocks and journal is part of
 the object store. Each segment contains a segment header
 and a number of objects, each consisting of the object
 header and the payload. Objects are either inodes,
 directory entries (dentries), file data blocks or indirect
 blocks.




                          Bergwolf    Flash Device and Logfs
Flash Introduction
                              Logfs


Inode Allocation




 Currently, inodes are allocated sequencially.




                          Bergwolf    Flash Device and Logfs
Flash Introduction
                              Logfs


Block Allocation
 Block are allocated in one of several segments depending on
 their level. The following levels are used:
      0 - regular data block
      1 - i1 indirect blocks
      2 - i2 indirect blocks
      3 - i3 indirect blocks
      4 - i4 indirect blocks
      5 - i5 indirect blocks


                          Bergwolf    Flash Device and Logfs
Flash Introduction
                            Logfs


Block Allocation (Cont.)
    6 - ifile data blocks
    7 - ifile i1 indirect blocks
    8 - ifile i2 indirect blocks
    9 - ifile i3 indirect blocks
    10 - ifile i4 indirect blocks
    11 - ifile i5 indirect blocks
    Potential levels to be used in the future:
         12 - gc recycled blocks, long-lived data
         13 - replacement blocks, short-lived data

                        Bergwolf    Flash Device and Logfs
Flash Introduction
                              Logfs


Logfs Dentry Structure


 Logfs has on-medium dentry structure, which is stored in
 inode’s datablocks.
 struct logfs disk dentry {
      be64 ino;
      be16 namelen;
      u8 type;
      u8 name[LOGFS MAX NAMELEN];
 } attribute ((packed));




                          Bergwolf    Flash Device and Logfs
Flash Introduction
             Logfs




Thank you!
       Q&A
                                  Copyright c 2009.
             No rights reserved except that of others.
                                             Bergwolf



         Bergwolf    Flash Device and Logfs

More Related Content

What's hot

CephFS in Jewel: Stable at Last
CephFS in Jewel: Stable at LastCephFS in Jewel: Stable at Last
CephFS in Jewel: Stable at LastCeph Community
 
Linux performance tuning & stabilization tips (mysqlconf2010)
Linux performance tuning & stabilization tips (mysqlconf2010)Linux performance tuning & stabilization tips (mysqlconf2010)
Linux performance tuning & stabilization tips (mysqlconf2010)Yoshinori Matsunobu
 
ZFS for Databases
ZFS for DatabasesZFS for Databases
ZFS for Databasesahl0003
 
Ceph Day KL - Ceph on All-Flash Storage
Ceph Day KL - Ceph on All-Flash Storage Ceph Day KL - Ceph on All-Flash Storage
Ceph Day KL - Ceph on All-Flash Storage Ceph Community
 
Ceph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for CephCeph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for CephDanielle Womboldt
 
ZFS Tutorial USENIX June 2009
ZFS  Tutorial  USENIX June 2009ZFS  Tutorial  USENIX June 2009
ZFS Tutorial USENIX June 2009Richard Elling
 
ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011Richard Elling
 
An Introduction to the Implementation of ZFS by Kirk McKusick
An Introduction to the Implementation of ZFS by Kirk McKusickAn Introduction to the Implementation of ZFS by Kirk McKusick
An Introduction to the Implementation of ZFS by Kirk McKusickeurobsdcon
 
ZFS by PWR 2013
ZFS by PWR 2013ZFS by PWR 2013
ZFS by PWR 2013pwrsoft
 
Zfs Nuts And Bolts
Zfs Nuts And BoltsZfs Nuts And Bolts
Zfs Nuts And BoltsEric Sproul
 
PostgreSQL + ZFS best practices
PostgreSQL + ZFS best practicesPostgreSQL + ZFS best practices
PostgreSQL + ZFS best practicesSean Chittenden
 
ZFS Workshop
ZFS WorkshopZFS Workshop
ZFS WorkshopAPNIC
 
Comparison between OCFS2 and GFS2
Comparison between OCFS2 and GFS2Comparison between OCFS2 and GFS2
Comparison between OCFS2 and GFS2Gang He
 
Ceph Day Taipei - Delivering cost-effective, high performance, Ceph cluster
Ceph Day Taipei - Delivering cost-effective, high performance, Ceph cluster Ceph Day Taipei - Delivering cost-effective, high performance, Ceph cluster
Ceph Day Taipei - Delivering cost-effective, high performance, Ceph cluster Ceph Community
 

What's hot (17)

MySQL on ZFS
MySQL on ZFSMySQL on ZFS
MySQL on ZFS
 
CephFS in Jewel: Stable at Last
CephFS in Jewel: Stable at LastCephFS in Jewel: Stable at Last
CephFS in Jewel: Stable at Last
 
Linux performance tuning & stabilization tips (mysqlconf2010)
Linux performance tuning & stabilization tips (mysqlconf2010)Linux performance tuning & stabilization tips (mysqlconf2010)
Linux performance tuning & stabilization tips (mysqlconf2010)
 
ZFS for Databases
ZFS for DatabasesZFS for Databases
ZFS for Databases
 
Ceph Day KL - Ceph on All-Flash Storage
Ceph Day KL - Ceph on All-Flash Storage Ceph Day KL - Ceph on All-Flash Storage
Ceph Day KL - Ceph on All-Flash Storage
 
Ceph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for CephCeph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for Ceph
 
ZFS Tutorial USENIX June 2009
ZFS  Tutorial  USENIX June 2009ZFS  Tutorial  USENIX June 2009
ZFS Tutorial USENIX June 2009
 
ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011
 
An Introduction to the Implementation of ZFS by Kirk McKusick
An Introduction to the Implementation of ZFS by Kirk McKusickAn Introduction to the Implementation of ZFS by Kirk McKusick
An Introduction to the Implementation of ZFS by Kirk McKusick
 
ZFS by PWR 2013
ZFS by PWR 2013ZFS by PWR 2013
ZFS by PWR 2013
 
Zfs Nuts And Bolts
Zfs Nuts And BoltsZfs Nuts And Bolts
Zfs Nuts And Bolts
 
PostgreSQL + ZFS best practices
PostgreSQL + ZFS best practicesPostgreSQL + ZFS best practices
PostgreSQL + ZFS best practices
 
ZFS
ZFSZFS
ZFS
 
ZFS Workshop
ZFS WorkshopZFS Workshop
ZFS Workshop
 
Comparison between OCFS2 and GFS2
Comparison between OCFS2 and GFS2Comparison between OCFS2 and GFS2
Comparison between OCFS2 and GFS2
 
Ceph Day Taipei - Delivering cost-effective, high performance, Ceph cluster
Ceph Day Taipei - Delivering cost-effective, high performance, Ceph cluster Ceph Day Taipei - Delivering cost-effective, high performance, Ceph cluster
Ceph Day Taipei - Delivering cost-effective, high performance, Ceph cluster
 
(Free and Net) BSD Xen Roadmap
(Free and Net) BSD Xen Roadmap(Free and Net) BSD Xen Roadmap
(Free and Net) BSD Xen Roadmap
 

Viewers also liked

MS TechDays 2011 - Cloud Management with System Center Application Controller
MS TechDays 2011 - Cloud Management with System Center Application ControllerMS TechDays 2011 - Cloud Management with System Center Application Controller
MS TechDays 2011 - Cloud Management with System Center Application ControllerSpiffy
 
"Empower Developers with HPE Machine Learning and Augmented Intelligence", Dr...
"Empower Developers with HPE Machine Learning and Augmented Intelligence", Dr..."Empower Developers with HPE Machine Learning and Augmented Intelligence", Dr...
"Empower Developers with HPE Machine Learning and Augmented Intelligence", Dr...Dataconomy Media
 
HPE Software at Discover 2016 London 29 November—1 December
HPE Software at Discover 2016 London 29 November—1 DecemberHPE Software at Discover 2016 London 29 November—1 December
HPE Software at Discover 2016 London 29 November—1 Decemberat MicroFocus Italy ❖✔
 
Product Marketing Framework for Product or Service Launch
Product Marketing Framework for Product or Service LaunchProduct Marketing Framework for Product or Service Launch
Product Marketing Framework for Product or Service LaunchJanet Jaiswal
 
Agile Program and Portfolio Management
Agile Program and Portfolio ManagementAgile Program and Portfolio Management
Agile Program and Portfolio ManagementMike Cottmeyer
 

Viewers also liked (7)

MS TechDays 2011 - Cloud Management with System Center Application Controller
MS TechDays 2011 - Cloud Management with System Center Application ControllerMS TechDays 2011 - Cloud Management with System Center Application Controller
MS TechDays 2011 - Cloud Management with System Center Application Controller
 
"Empower Developers with HPE Machine Learning and Augmented Intelligence", Dr...
"Empower Developers with HPE Machine Learning and Augmented Intelligence", Dr..."Empower Developers with HPE Machine Learning and Augmented Intelligence", Dr...
"Empower Developers with HPE Machine Learning and Augmented Intelligence", Dr...
 
HPE_Software_Portfolio_VKS2016
HPE_Software_Portfolio_VKS2016HPE_Software_Portfolio_VKS2016
HPE_Software_Portfolio_VKS2016
 
HPE Software at Discover 2016 London 29 November—1 December
HPE Software at Discover 2016 London 29 November—1 DecemberHPE Software at Discover 2016 London 29 November—1 December
HPE Software at Discover 2016 London 29 November—1 December
 
Captive 2.0 - The Next Generation
Captive 2.0 - The Next GenerationCaptive 2.0 - The Next Generation
Captive 2.0 - The Next Generation
 
Product Marketing Framework for Product or Service Launch
Product Marketing Framework for Product or Service LaunchProduct Marketing Framework for Product or Service Launch
Product Marketing Framework for Product or Service Launch
 
Agile Program and Portfolio Management
Agile Program and Portfolio ManagementAgile Program and Portfolio Management
Agile Program and Portfolio Management
 

Similar to logfs

Wish list from PostgreSQL - Linux Kernel Summit 2009
Wish list from PostgreSQL - Linux Kernel Summit 2009Wish list from PostgreSQL - Linux Kernel Summit 2009
Wish list from PostgreSQL - Linux Kernel Summit 2009Takahiro Itagaki
 
Configuring Syslog by Octavio
Configuring Syslog by OctavioConfiguring Syslog by Octavio
Configuring Syslog by OctavioRowell Dionicio
 
I can\'t believe this is butter - A Tour of btrfs
I can\'t believe this is butter - A Tour of btrfsI can\'t believe this is butter - A Tour of btrfs
I can\'t believe this is butter - A Tour of btrfsAvi Miller
 
Dmytro Okhonko "LogDevice: durable and highly available sequential distribute...
Dmytro Okhonko "LogDevice: durable and highly available sequential distribute...Dmytro Okhonko "LogDevice: durable and highly available sequential distribute...
Dmytro Okhonko "LogDevice: durable and highly available sequential distribute...Fwdays
 
NAND-Flash-Data-Recovery-Cookbook-igor.pdf
NAND-Flash-Data-Recovery-Cookbook-igor.pdfNAND-Flash-Data-Recovery-Cookbook-igor.pdf
NAND-Flash-Data-Recovery-Cookbook-igor.pdfsheikhfarhanm6948
 
ZFS Tutorial USENIX LISA09 Conference
ZFS Tutorial USENIX LISA09 ConferenceZFS Tutorial USENIX LISA09 Conference
ZFS Tutorial USENIX LISA09 ConferenceRichard Elling
 
Sheepdog Status Report
Sheepdog Status ReportSheepdog Status Report
Sheepdog Status ReportLiu Yuan
 
Paper_Scalable database logging for multicores
Paper_Scalable database logging for multicoresPaper_Scalable database logging for multicores
Paper_Scalable database logging for multicoresHyo jeong Lee
 
Ange Albertini and Gynvael Coldwind: Schizophrenic Files – A file that thinks...
Ange Albertini and Gynvael Coldwind: Schizophrenic Files – A file that thinks...Ange Albertini and Gynvael Coldwind: Schizophrenic Files – A file that thinks...
Ange Albertini and Gynvael Coldwind: Schizophrenic Files – A file that thinks...Area41
 
User guide wishbone serializer
User guide wishbone serializerUser guide wishbone serializer
User guide wishbone serializerdragonvnu
 
Efficient logging in multithreaded C++ server
Efficient logging in multithreaded C++ serverEfficient logging in multithreaded C++ server
Efficient logging in multithreaded C++ serverShuo Chen
 
LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)Linaro
 
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance Barriers
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance BarriersCeph Day Berlin: Ceph on All Flash Storage - Breaking Performance Barriers
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance BarriersCeph Community
 

Similar to logfs (20)

RocksDB meetup
RocksDB meetupRocksDB meetup
RocksDB meetup
 
Wish list from PostgreSQL - Linux Kernel Summit 2009
Wish list from PostgreSQL - Linux Kernel Summit 2009Wish list from PostgreSQL - Linux Kernel Summit 2009
Wish list from PostgreSQL - Linux Kernel Summit 2009
 
Configuring Syslog by Octavio
Configuring Syslog by OctavioConfiguring Syslog by Octavio
Configuring Syslog by Octavio
 
I can\'t believe this is butter - A Tour of btrfs
I can\'t believe this is butter - A Tour of btrfsI can\'t believe this is butter - A Tour of btrfs
I can\'t believe this is butter - A Tour of btrfs
 
Dmytro Okhonko "LogDevice: durable and highly available sequential distribute...
Dmytro Okhonko "LogDevice: durable and highly available sequential distribute...Dmytro Okhonko "LogDevice: durable and highly available sequential distribute...
Dmytro Okhonko "LogDevice: durable and highly available sequential distribute...
 
NAND-Flash-Data-Recovery-Cookbook-igor.pdf
NAND-Flash-Data-Recovery-Cookbook-igor.pdfNAND-Flash-Data-Recovery-Cookbook-igor.pdf
NAND-Flash-Data-Recovery-Cookbook-igor.pdf
 
ZFS Tutorial USENIX LISA09 Conference
ZFS Tutorial USENIX LISA09 ConferenceZFS Tutorial USENIX LISA09 Conference
ZFS Tutorial USENIX LISA09 Conference
 
Stack Frame Protection
Stack Frame ProtectionStack Frame Protection
Stack Frame Protection
 
Sheepdog Status Report
Sheepdog Status ReportSheepdog Status Report
Sheepdog Status Report
 
Debugging ZFS: From Illumos to Linux
Debugging ZFS: From Illumos to LinuxDebugging ZFS: From Illumos to Linux
Debugging ZFS: From Illumos to Linux
 
Paper_Scalable database logging for multicores
Paper_Scalable database logging for multicoresPaper_Scalable database logging for multicores
Paper_Scalable database logging for multicores
 
CLFS 2010
CLFS 2010CLFS 2010
CLFS 2010
 
Bluestore
BluestoreBluestore
Bluestore
 
Bluestore
BluestoreBluestore
Bluestore
 
Schizophrenic files
Schizophrenic filesSchizophrenic files
Schizophrenic files
 
Ange Albertini and Gynvael Coldwind: Schizophrenic Files – A file that thinks...
Ange Albertini and Gynvael Coldwind: Schizophrenic Files – A file that thinks...Ange Albertini and Gynvael Coldwind: Schizophrenic Files – A file that thinks...
Ange Albertini and Gynvael Coldwind: Schizophrenic Files – A file that thinks...
 
User guide wishbone serializer
User guide wishbone serializerUser guide wishbone serializer
User guide wishbone serializer
 
Efficient logging in multithreaded C++ server
Efficient logging in multithreaded C++ serverEfficient logging in multithreaded C++ server
Efficient logging in multithreaded C++ server
 
LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)
 
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance Barriers
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance BarriersCeph Day Berlin: Ceph on All Flash Storage - Breaking Performance Barriers
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance Barriers
 

More from bergwolf

NFS updates for CLSF
NFS updates for CLSFNFS updates for CLSF
NFS updates for CLSFbergwolf
 
Google Megastore
Google MegastoreGoogle Megastore
Google Megastorebergwolf
 
vmfs intro
vmfs introvmfs intro
vmfs introbergwolf
 
pnfs status
pnfs statuspnfs status
pnfs statusbergwolf
 
linux trim
linux trimlinux trim
linux trimbergwolf
 
network filesystem briefs
network filesystem briefsnetwork filesystem briefs
network filesystem briefsbergwolf
 
gsoc and grub4ext4
gsoc and grub4ext4gsoc and grub4ext4
gsoc and grub4ext4bergwolf
 
grub4ext4 status-plans
grub4ext4 status-plansgrub4ext4 status-plans
grub4ext4 status-plansbergwolf
 

More from bergwolf (10)

NFS updates for CLSF
NFS updates for CLSFNFS updates for CLSF
NFS updates for CLSF
 
Linux aio
Linux aioLinux aio
Linux aio
 
RCU
RCURCU
RCU
 
Google Megastore
Google MegastoreGoogle Megastore
Google Megastore
 
vmfs intro
vmfs introvmfs intro
vmfs intro
 
pnfs status
pnfs statuspnfs status
pnfs status
 
linux trim
linux trimlinux trim
linux trim
 
network filesystem briefs
network filesystem briefsnetwork filesystem briefs
network filesystem briefs
 
gsoc and grub4ext4
gsoc and grub4ext4gsoc and grub4ext4
gsoc and grub4ext4
 
grub4ext4 status-plans
grub4ext4 status-plansgrub4ext4 status-plans
grub4ext4 status-plans
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

logfs

  • 1. Flash Introduction Logfs Brief Intro to Logfs 彭 涛 BUPT—Broadband Network Research Center Bergwolf Flash Device and Logfs
  • 2. Flash Introduction Logfs Contents 1 Flash Introduction 2 Logfs Bergwolf Flash Device and Logfs
  • 3. Flash Introduction Logfs 1 Flash Introduction 2 Logfs Bergwolf Flash Device and Logfs
  • 4. Flash Introduction Logfs Characteristics No seek time Page: write granularity. 1 bit(NOR), 8-16 bytes(ECCNOR), 256, 512 or 2048 bytes(NAND, AGAND) Erase block: usually a power of 2 from 32k to 256k. ECC(error checking and correction) is needed. Bergwolf Flash Device and Logfs
  • 5. Flash Introduction Logfs Advantage Performance Reliability(people are advocating this, but evidences... :P) Power saving(citing Intel: 13% battery life extension is reported in SSD) Bergwolf Flash Device and Logfs
  • 6. Flash Introduction Logfs Limitation Must be erased before rewritten: out of place updating Erase block larger than fs block: garbage collection Erase cycles(about 100,000 per erase block): wear leveling Others...(Like MLC NAND’s paired pages) Bergwolf Flash Device and Logfs
  • 7. Flash Introduction Logfs 1 Flash Introduction 2 Logfs Bergwolf Flash Device and Logfs
  • 8. Flash Introduction Logfs Overview A flash filesystem for Linux working on top of MTD. A journaling filesystem. A log-structured filesystem. out of place updating: wandering tree Wear leveling: pre scanning and determining Garbage collection. MLC flash support (uncertain)... Bergwolf Flash Device and Logfs
  • 9. Flash Introduction Logfs Log-structure layout Treats its storage as a circular log and writes sequentially to the head of the log. Bergwolf Flash Device and Logfs
  • 10. Flash Introduction Logfs Log-structure layout(Cont.) Writes create multiple, chronologically-advancing versions of both file data and meta-data. Recovery from crashes is simpler. Upon its next mount, the file system can reconstruct its state from the last consistent point in the log. Free space must be constantly reclaimed from the tail of the log to prevent the file system from becoming full when the head of the log wraps around to meet it. Bergwolf Flash Device and Logfs
  • 11. Flash Introduction Logfs Log-structure layout(Cont.) logfs devides the device into segments to avoid garbage collection IO overhead. See the gc slides. Bergwolf Flash Device and Logfs
  • 12. Flash Introduction Logfs Wandering Tree !@#$% Bergwolf Flash Device and Logfs
  • 13. Flash Introduction Logfs Garbage Collection This is the reason why a flash filesystem is needed. FTL has to look into each fs’s internal structure to find out which block is in use and which is obsolete(due to file deletion). And I think this is where the rumor FTL is optimized for FAT filesystem comes from. Bergwolf Flash Device and Logfs
  • 14. Flash Introduction Logfs Garbage Collection This is the reason why a flash filesystem is needed. FTL has to look into each fs’s internal structure to find out which block is in use and which is obsolete(due to file deletion). And I think this is where the rumor FTL is optimized for FAT filesystem comes from. A TRIM command is introduced into ATA specification, telling the underlying hardware a chunk of sectors is no longer need. Bergwolf Flash Device and Logfs
  • 15. Flash Introduction Logfs Vim Old data recycled during gc operation is expected to be long-lived. New data is of uncertain life expectancy. New data used to replace older blocks in existing files is expected to be short-lived. Bergwolf Flash Device and Logfs
  • 16. Flash Introduction Logfs Vim (Cont.) By cleverly predicting the life time of data, it is possible to seperate long-living data from short-living data and thereby reduce the GC overhead later. Each type of distinc life expectency (vim) can have a seperate segment open for writing. Each (level, vim) tupel can be open just once. If an open segment with unknown vim is encountered at mount time, it is closed and ignored henceforth. Bergwolf Flash Device and Logfs
  • 17. Flash Introduction Logfs Inode File All inodes are stored in a special file, the inode file. Single exception is the inode file’s inode (master inode) which for obvious reasons is stored in the journal instead. Instead of data blocks, the leaf nodes of the inode files are inodes. Bergwolf Flash Device and Logfs
  • 18. Flash Introduction Logfs Object Store All space except for the superblocks and journal is part of the object store. Each segment contains a segment header and a number of objects, each consisting of the object header and the payload. Objects are either inodes, directory entries (dentries), file data blocks or indirect blocks. Bergwolf Flash Device and Logfs
  • 19. Flash Introduction Logfs Inode Allocation Currently, inodes are allocated sequencially. Bergwolf Flash Device and Logfs
  • 20. Flash Introduction Logfs Block Allocation Block are allocated in one of several segments depending on their level. The following levels are used: 0 - regular data block 1 - i1 indirect blocks 2 - i2 indirect blocks 3 - i3 indirect blocks 4 - i4 indirect blocks 5 - i5 indirect blocks Bergwolf Flash Device and Logfs
  • 21. Flash Introduction Logfs Block Allocation (Cont.) 6 - ifile data blocks 7 - ifile i1 indirect blocks 8 - ifile i2 indirect blocks 9 - ifile i3 indirect blocks 10 - ifile i4 indirect blocks 11 - ifile i5 indirect blocks Potential levels to be used in the future: 12 - gc recycled blocks, long-lived data 13 - replacement blocks, short-lived data Bergwolf Flash Device and Logfs
  • 22. Flash Introduction Logfs Logfs Dentry Structure Logfs has on-medium dentry structure, which is stored in inode’s datablocks. struct logfs disk dentry { be64 ino; be16 namelen; u8 type; u8 name[LOGFS MAX NAMELEN]; } attribute ((packed)); Bergwolf Flash Device and Logfs
  • 23. Flash Introduction Logfs Thank you! Q&A Copyright c 2009. No rights reserved except that of others. Bergwolf Bergwolf Flash Device and Logfs