1 of 15

How to write a Database

I/O Stack

Joway Wang

iftech 2019.08

2 of 15

VFS

3 of 15

VFS - Data Struct

4 of 15

VFS - Link

5 of 15

VFS - Page Cache

6 of 15

VFS - Direct I/O

7 of 15

File System

$ cat /var/log/messages

8 of 15

File System

9 of 15

File System | Raw Device Optimize

10 of 15

File System | FUSE

11 of 15

Block Layer | I/O Scheduler

12 of 15

Storage Technology

DAS:Direct attached storage (local storage)

NAS:Offers file-level storage for end users that are connected to a network (AWS EFS).

SAN:Provides block-level storage for servers in a data center (AWS EBS).

SDS:A computer program that manages data storage resources and functionality and has no dependencies on the underlying physical storage hardware (Ceph).

13 of 15

Storage Technology

14 of 15

Storage Technology

文件存储:基于文件的存储

对象存储:基于对象的存储,将文件被拆分成多个部分并散布在多个硬件间。缺点是无法修改对象,必须一次性完整地写入对象。

块存储:将数据拆分成块,并单独存储各个块。缺点是处理元数据的能力有限。

15 of 15

Q&A