Download presentation
Presentation is loading. Please wait.
1
Seminar on Linux-based embedded systems
Root File system for Raspberry Pi Aalto University 13th Dec 2013 Presenter: Bastian Arjun Shajit (338303)
2
Agenda Introduction Types of File system Selecting a Root file system
Performance Comparison Summary
3
What is a File system ? Gargantuan amount of data stored as 1s and 0s on storage media (conceivable by machine) Impossible to understand files/folders from the sea of binary data. File system was designed as a novel way to organize such data easily understandable by all users.
4
Definition It can refer to
The abstract structure in which files are named and logically stored in a storage media (RFS) eg. In any *NIX distribution, (or) The software which provides the core support for implementing the abstraction defined above in the operating system/kernel. Root/Top level Directory / bin dev home etc lib
5
Agenda Introduction Types of File system Selecting a Root file system
Performance Comparison Summary
6
Block-device File Systems
Considers storage device as a simple linear collection of blocks or sectors. Size of blocks vary (512, 1024 …) Have two main operation : Read & Write Type of Devices: LBA devices (HDDs) FTL devices (USB flash drive, SD, SSDs etc). In case of bad blocks, the FTL or hardware (for LBA devices) takes care of hiding from user. File system drivers : ext2, ext3, ext4, FAT, NTFS, ReiserFS etc.
7
Flash File Systems Mainly used on Raw Flash Devices
Linux provides MTD as a primitive translation Layer. How are they Different? They are not block devices Mostly raw NAND / NOR storage media. They consist of ERASEBLOCKS Have 3 main operation : Read, Write & Erase Eraseblock Each block has limited lifespan (1000s of write cycles) Needs write to be spread.
8
Flash File Systems II FTL devices Vs Raw Flash device
FTL devices has a micro-controller which runs FTL firmware. Helps to emulate a block device. Why FFS is unique? Needs to spread write Perform Garbage collection Bad blocks handling Better reliability compared to FTL (Since FTL is vendor specific) E.g. UBIFS, JFFS2 etc.
9
In-Memory File system Uses primary memory e.g. RAM Features:
Has higher I/O performance Volatile Memory E.g, ramfs, tmpfs, ramdisk. Why not ramdisk? It emulates block device in RAM. Block device store recently accessed files in caches. Hence using ramdisk creates a large memory foot print Hard limit on max size of ram disk.
10
User Space File system Mainly intended for block devices.
Resides in the user space. Overhead of communicating to and from kernel and User space. Distinct Advantage: A bad user space file-system can never cause a system crash. E.g. ntfs-3g
11
Compressed Read-only File systems
Data Stored in compressed format. Especially useful in low memory systems E.g. Cramfs: Metadata not stored (No time stamps or user permissions) Possible security issues. Max file system size = 256 MB Squashfs stores metadata information. Max filesystem size = 2^64.
12
Linux Virtual File system
Role of VFS: Register/de-register Associate devices and file system drivers. Generic File operations Caching Look ups Forward File-system specific operation: Read Write etc
13
Agenda Introduction Types of File system Selecting a Root file system
Performance Comparison Summary
14
Selecting a root file-system
Based on the type of device Is it Raw flash, RAM or block device Based on available system resource. Based on the type of I/O on the device If Read-only, then handle partitions required by kernel for write. Based on the data volatility To persist data or not. Based on data usage and demand.
15
Bare minimal Root Filesystem
Created a bare minimal root filesystem using buildroot for RPi. Refer buildroot manual for instructions, Includes basic utilities. Saves disc space. Following figure represents the size of rootfs obtained from buildroot. Type Raw Root Filesystem (MB) With Kernel Libraries (MB) Bare Minimal 4.97 5.32 With Essential Utils 20.65 32.33 Raspbian 1641.1
16
Agenda Introduction Types of File system Selecting a Root file system
Performance Comparison Summary
17
Experiment Aims at providing a new perspective on how to choose file system based on performance. Comparison between ramfs vs ntfs-3g vs ext2 Moved root file-system across different storage media to analyze performance. Performance aspects considered: I/O speed CPU usage.
18
Performance Benchmark I
19
Performance Benchmark II
20
Agenda Introduction Types of File system Selecting a Root file system
Performance Comparison Summary
21
Summary Successfully created a bare minimal and fully loaded root file system. There isn’t “One file system to rule them all”. Varying requirement give rise to numerous possibilities and a mix & match of different file systems can perhaps solve the need of the hour. Many file systems were not analyzed Raw flash device unavailability to test flash file systems. Failed experiments with squashfs. Out of scope file-systems like msdos, nfs, smbfs, cifs.
22
Thank you !!!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.