meta data for this page

Benchmarks

Date kernel Hardware ver. eMMC size File system encryption Read (bw) Write (bw) Comment
2021-02-23 5.10 1.1 ext4 on eMMC 8150kB/s 2727kB/s kernel 5.11 performed very similar
2021-03-01 5.10 1.1 f2fs on eMMC 7247kB/s 2425kB/s
2021-02-23 5.10 1.1 ext4 FS on SD card (Sandisk 64GB Class 10, XC I) 2427kB/s 812kB/s
2021-02-23 5.11 1.2b ext4 on eMMC LUKS 3812kB/s 1275kB/s upgraded factory image
2021-03-01 5.10 1.2a BTRFS on SD (Sandisk 32GB Class 10 HC I) 2018kB/s 675kB/s
2021-10-28 5.10 1.2b 32GB BTRFS on eMMC 6705kB/s 2244kB/s Mobian Bookworm
2021-10-28 5.10 1.2b 32GB BTRFS+LZO on eMMC 6884kB/s 2304kB/s Mobian Bookworm
2021-10-28 5.10 1.2b 32GB EXT4 on eMMC 5419kB/s 1813kB/s Mobian Bookworm
2021-10-28 5.10 1.2b 32GB EXT2 on eMMC 6049kB/s 2024kB/s Mobian Bookworm
2021-02-27 5.9 Librem5 (Evergreen) ext4 on eMMC 17.1MB/s 5708kB/s for comparison with Pinephone
2021-03-11 5.11 rc5 bq Aquaris X5 (paella) ext4 on eMMC 8276kB/s 2769kB/s for comparison with Pinephone
Notes for reproducibility

(Based on https://wiki.debian.org/PinePhone/Benchmarks). The interesting output is in those lines:

  READ: bw=6551KiB/s (6708kB/s), 6551KiB/s-6551KiB/s (6708kB/s-6708kB/s), io=47.0MiB (50.3MB), run=7496-7496msec 
  WRITE: bw=2192KiB/s (2245kB/s), 2192KiB/s-2192KiB/s (2245kB/s-2245kB/s), io=16.0MiB (16.8MB), run=7496-7496msec 

Tests run with:

fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=64M --readwrite=randrw --rwmixread=75 --loops=2
"Real-life" Benchmarks

In order to get a better view of the performance difference between filesystems, it's possible to measure the time it takes to boot for each part and also how much time Firefox takes to start.

Date kernel Hardware ver. eMMC size File system encryption / compression gain FSBL SSBL Linux Init Total Firefox firstPaint Comment
2021-11-11 5.10 1.2b 32GB BTRFS on eMMC .87s 3.95s 3.62s 13.29s 21.73s Mobian Bookworm
2021-11-11 5.10 1.2b 32GB BTRFS+LZO on eMMC 44% (2.7GB–> 1.5GB) .87s 3.95s 3.62s 14.05s 22.49s 9120ms Mobian Bookworm, Firefox 78.14
2021-11-11 5.10 1.2b 32GB BTRFS+ZSTD on eMMC 48% (2.7GB–> 1.4GB) .87s 3.96s 3.60s 13.52s 21.94s 10706ms Mobian Bookworm, Firefox 78.14
2021-11-11 5.10 1.2b 32GB BTRFS+ZLIB on eMMC 48% (2.7GB–> 1.4GB) .87s 3.96s 3.60s 13.28s 21.71s 10397ms Mobian Bookworm, Firefox 78.14
2021-11-11 5.10 1.2b 32GB F2FS on eMMC .87s 3.96s 3.60s 13.08s 21.51s 11164ms Mobian Bookworm, Firefox 78.14

Details:

(Based on https://wiki.st.com/stm32mpu/wiki/How_to_optimize_the_boot_time#Using_a_serial_console).

As a side node, /boot filesystem is by default ext4 and when the filesystem is changed for example to BTRFS, /boot filesystem stays with ext4

Step 1: switch your Pinephone to serial mode by switching off the sound switch on the main board. Connect the serial cable to your Pinephone and your Linux computer

Step 2: install in a directory as described on the Wiki above, the utility “p2f”: http://p2f.tuxfamily.org/

Step 3: copy the measuring Bash script in a directory and modify the path for “p2f” to reflect your installation:

#!/usr/bin/env bash

export PATH=$PATH:p2f-v0.4.0

echo 'Waiting for board reset...'

p2f-wait 'NOTICE:' 'U-Boot SPL'
t0=$(</proc/uptime)

p2f-wait 'U-Boot 20'
t1=$(</proc/uptime)

p2f-wait 'Starting kernel ...'
t2=$(</proc/uptime)

p2f-wait 'init process'
t3=$(</proc/uptime)

p2f-wait 'mobian login:'
t4=$(</proc/uptime)

t0=$(echo "$t0" | awk '{print $1}')
t1=$(echo "$t1" | awk '{print $1}')
t2=$(echo "$t2" | awk '{print $1}')
t3=$(echo "$t3" | awk '{print $1}')
t4=$(echo "$t4" | awk '{print $1}')

echo ''
echo ''
echo 'Timing results:'
echo "FSBL:  $(echo "scale=2; $t1 - $t0" | bc)s"
echo "SSBL:  $(echo "scale=2; $t2 - $t1" | bc)s"
echo "Linux: $(echo "scale=2; $t3 - $t2" | bc)s"
echo "init:  $(echo "scale=2; $t4 - $t3" | bc)s"
echo "total: $(echo "scale=2; $t4 - $t0" | bc)s"

Step 4: Install “microcom” on your Linux computer

Step 5: Run the following command line: microcom -p /dev/ttyUSB0 | bash Measure-timing.txt

Step 6: Reboot your Pinephone, you should get something like:

Timing results:
FSBL:  .87s
SSBL:  3.95s
Linux: 3.62s
init:  14.05s
total: 22.49s

In order to have something reproducible, it's always a fresh install of Mobian with all updates applied and then some small modifications (at your own risk):

sudo apt install openssh-server
sudo apt remove gnome-software
sudo apt update
sudo apt dist-upgrade
sudo apt autoremove
sudo apt clean all
sudo reboot

Regarding Firefox starting time, for reproducibility one needs to do the following:

Configure Firefox so that the starting page is set to blank
Reboot Mobian
Wait a few minutes
Open your session in Phosh
Check from ssh that no process is eating the CPU
Start Firefox (after reboot it should be the first time you start Firefox otherwise it's already cached in the RAM)
Type in the URL bar: about:telemetry#simple-measurements-tab
Get the value "firstPaint" (it measures the time Firefox needs to display the starting page)