EROFS: A Compression-friendly Readonly File System for Resource-scarce Devices
Xiang Gao#, Mingkai Dong*, Xie Miao#, Wei Du#, Chao Yu#, Haibo Chen*,#
#Huawei Technologies Co., Ltd. *IPADS, Shanghai Jiao Tong University USENIX ATC 2019, Renton, WA, USA
System resources in Android
/oem /system 3072 2654
/system Partition Size (MB) /odm
840 654 650 512 /vendor 2.3.6 4.3 5.1 6.0 7.0 8.0
Android Version ... System resources consume insignificant storage! System resources in Android
Read-only Read-only /oem /system 3072 2654 Read-only
/system Partition Size (MB) /odm
Read-only 840 654 650 512 /vendor 2.3.6 4.3 5.1 6.0 7.0 8.0
Android Version ... System resources consume insignificant storage! Read-only system partitions → compressed read-only file systems Squashfs on system partitions
/system /oem
/vendor /odm Squashfs on system partitions
/system /oem Squashfs Squashfs
/vendor /odm Squashfs Squashfs Squashfs on system partitions
/system /oem Squashfs Squashfs
/vendor /odm Squashfs Squashfs Squashfs on system partitions
Fixed-sized input compression
/system /oem Squashfs Squashfs
/vendor /odm Squashfs Squashfs Squashfs on system partitions Read Amplification
1 byte
decompression amplification
/system /oem ...... Squashfs Squashfs I/O /vendor /odm amplification Squashfs Squashfs Squashfs on system partitions Read Amplification Massive Memory Consumption buffer_head 1 byte ...
decompression amplification decompress
Page cache copy /system /oem ...... Squashfs Squashfs I/O /vendor /odm amplification Squashfs Squashfs EROFS
/system /oem Squashfs Squashfs
/vendor /odm Squashfs Squashfs EROFS Fixed-sized output compression
/system /oem Squashfs Squashfs
/vendor /odm Squashfs Squashfs EROFS Read Amplification 84% Fixed-sized output compression
/system /oem Squashfs Squashfs
/vendor /odm Squashfs Squashfs EROFS Read Amplification 84% Memory Consumption 89% Fixed-sized output compression Vmap Buffer In-place
Rolling
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2
/system /oem Squashfs Squashfs
/vendor /odm Squashfs Squashfs EROFS Read Amplification 84% Memory Consumption 89% Fixed-sized output compression Vmap Buffer In-place
Rolling
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2
üSaves >30% storage used by system resources
/system /oem EROFS EROFS üComparable or even better performance than Ext4
/vendor /odm üUpstreamed to Linux 4.19 EROFS EROFS üRunning on 10,000,000+ smartphones EROFS: A Compression-friendly Readonly File System for Resource-scarce Devices
Hope to see you at our presentation! Wednesday July 10th, 3:00 PM Track I Filesystems
EROFSEROFSEROFS Thanks!