The AMAZING and INCREDIBLE twrp BENCHMARK
About
I just came to the point where I wanted to use the best performance settings while backing up with TWRP.
That said I looked around and there are no recommendations on I/O scheduler, CPU governor, read_ahead_kb or/and filesystem.
So I decided to benchmark on my own to provide the best speed in TWRP.
Well and maybe someone cares so I share that here for the public
Besides that I will create a new TWRP image containing the best settings based on the test I made.
Hardware
Device: LG G4 - H815 international (all these can be adapted to all other G4 variants of course)
Those benches above are just for getting the max possible values. They are not that much meaningful on their own because I want to know the performance of a twrp backup itself of course.
Backup setup
All test-set runs are made with the following backup sources:
Images:
Well those are very small so it is not a very good test - the "Files" section is really more important but I use it nevertheless.
Files:
How
A test-set is a combination of scheduler, governor and readahead size and those are the candidates:
So to be more detailed
good: means already finished)
EXT4 (Sandisk Extreme 128GB - Class 10, UHS-3)
TBD
F2FS (Sandisk Extreme 128GB - Class 10, UHS-3)
TBD
EXT4 (SanDisk Ultra Android 64 GB - Class 10, UHS-1)
F2FS (SanDisk Ultra Android 64 GB - Class 10, UHS-1)
In general the following has to be mentioned as well:
Status
Just check the above :good: marks
.. that means (X * 3) = Y single backup runs :silly:
To be able to test that without much effort I've created a benchmark script which autostarts a twrp backup with given options via adb (will be provided later as well).
I document all that stuff in LibreOffice Calc + nice graphs. Everyone likes graphs (and tbo its the only way to see the diffs later).
You see I still need to run dozens of tests!!!
.. but for the moment it seems that sioplus and f2fs are a good choice for backing up fast but we will see the real winner at the end first..
Not surprisingly the sdcard itself is crucial for speed so I will test another sdcard which is UHS-3(!!!) at the end as well. At least for the most promising of the above test-sets.
Credits
@marn3us : yea you are the reason behind doing all this
Famous last words
Don't trust any benchmark not made by yourself. They are all telling lies.
.
About
I just came to the point where I wanted to use the best performance settings while backing up with TWRP.
That said I looked around and there are no recommendations on I/O scheduler, CPU governor, read_ahead_kb or/and filesystem.
So I decided to benchmark on my own to provide the best speed in TWRP.
Well and maybe someone cares so I share that here for the public
Besides that I will create a new TWRP image containing the best settings based on the test I made.
Hardware
Device: LG G4 - H815 international (all these can be adapted to all other G4 variants of course)
- SDCard #1: BRAND NEW bought - SanDisk Ultra Android 64 GB microSDXC Memory Card, FFP up to 80 MB/s, Class 10, UHS-1
Code:PC benchmark with GNOME disk (gnome-disk): measurement size 50,0 MiB (52.428.800 Bytes) average read: 89 MB/s (100 measuring points) average write: 30,6 MB/s (100 measuring points) average access time: 0,64 ms (1000 measuring points) 4 measuring points directly on the device (within twrp): ~ # dd if=/dev/zero of=/external_sd/testfile bs=1G count=1 1073741824 bytes (1.0GB) copied, 26.909159 seconds, 38.1MB/s 1073741824 bytes (1.0GB) copied, 28.349294 seconds, 36.1MB/s 1073741824 bytes (1.0GB) copied, 28.204614 seconds, 36.3MB/s 1073741824 bytes (1.0GB) copied, 27.088227 seconds, 37.8MB/sThat means in theory it would be possible to get a write speed between: ~30,6 MB/s and 38.1MB/s with this card - SDCard #2: BRAND NEW bought - Sandisk Extreme 128GB SDXC Memory Card with SD Adaptor up to 90 MB/s, Class 10, UHS-3
Code:PC benchmark with GNOME disk (gnome-disk): measurement size 50,0 MiB (52.428.800 Bytes) average read: 87 MB/s (100 measuring points) average write: 51 MB/s (100 measuring points) average access time: 0,40 ms (1000 measuring points) 4 measuring points directly on the device (within twrp): ~ # dd if=/dev/zero of=/external_sd/testfile bs=1G count=1 1073741824 bytes (1.0GB) copied, 19.063505 seconds, 53.7MB/s 1073741824 bytes (1.0GB) copied, 19.155900 seconds, 53.5MB/s 1073741824 bytes (1.0GB) copied, 19.517557 seconds, 52.5MB/s 1073741824 bytes (1.0GB) copied, 18.673294 seconds, 54.8MB/sThat means in theory it would be possible to get a write speed between: ~51MB/s and ~54.8MB/s with this card
Those benches above are just for getting the max possible values. They are not that much meaningful on their own because I want to know the performance of a twrp backup itself of course.
Backup setup
All test-set runs are made with the following backup sources:
Images:
Well those are very small so it is not a very good test - the "Files" section is really more important but I use it nevertheless.
- Recovery (40 MB)
- Boot (40 MB)
Files:
- /system (1520 MB - ROM) - formatted as EXT4
- /data - formatted as EXT4
- 1x 500 MB file (created once with dd if=/dev/urandom ...)
- 1x 1GB file (created once with dd if=/dev/urandom ...)
- 1x 3 GB file (created once with dd if=/dev/urandom ...)
- normal /data content (~500 MB random data)
--> decrypted /data ! means we have another layer between
How
A test-set is a combination of scheduler, governor and readahead size and those are the candidates:
- CPU governors: intelliactive, performance
- I/O schedulers: fiops, deadline, sioplus
- read_ahead_kb: 1024, 2048
- filesystem (sdcard): EXT4, F2FS
- compression: on, off (compress the backup or not)
So to be more detailed
EXT4 (Sandisk Extreme 128GB - Class 10, UHS-3)
TBD
F2FS (Sandisk Extreme 128GB - Class 10, UHS-3)
TBD
EXT4 (SanDisk Ultra Android 64 GB - Class 10, UHS-1)
- :good: intelliactive + fiops + rh 1024
- :good: intelliactive + deadline + rh 1024
- :good: intelliactive + sioplus + rh 1024
- :good: intelliactive + fiops + rh 2048
- :good: intelliactive + deadline + rh 2048
- :good: intelliactive + sioplus + rh 2048
- :good: performance + fiops + rh 1024
- :good: performance + deadline + rh 1024
- :good: performance + sioplus + rh 1024
- :good: performance + fiops + rh 2048
- :good: performance + deadline + rh 2048
- :good: performance + sioplus + rh 2048
- :good: intelliactive + fiops + rh 1024 + compression
- :good: intelliactive + deadline + rh 1024 + compression
- :good: intelliactive + sioplus + rh 1024 + compression
- :good: intelliactive + fiops + rh 2048 + compression
- :good: intelliactive + deadline + rh 2048 + compression
- :good: intelliactive + sioplus + rh 2048 + compression
- :good: performance + fiops + rh 1024 + compression
- :good: performance + deadline + rh 1024 + compression
- :good: performance + sioplus + rh 1024 + compression
- :good: performance + fiops + rh 2048 + compression
- :good: performance + deadline + rh 2048 + compression
- :good: performance + sioplus + rh 2048 + compression
F2FS (SanDisk Ultra Android 64 GB - Class 10, UHS-1)
- :good: intelliactive + fiops + rh 1024
- :good: intelliactive + deadline + rh 1024
- :good: intelliactive + sioplus + rh 1024
- :good: intelliactive + fiops + rh 2048
- :good: intelliactive + deadline + rh 2048
- :good: intelliactive + sioplus + rh 2048
- :good: performance + fiops + rh 1024
- :good: performance + deadline + rh 1024
- :good: performance + sioplus + rh 1024
- :good: performance + fiops + rh 2048
- :good: performance + deadline + rh 2048
- :good: performance + sioplus + rh 2048
- :good: intelliactive + fiops + rh 1024 + compression
- :good: intelliactive + deadline + rh 1024 + compression
- :good: intelliactive + sioplus + rh 1024 + compression
- :good: intelliactive + fiops + rh 2048 + compression
- :good: intelliactive + deadline + rh 2048 + compression
- :good: intelliactive + sioplus + rh 2048 + compression
- :good: performance + fiops + rh 1024 + compression
- :good: performance + deadline + rh 1024 + compression
- :good: performance + sioplus + rh 1024 + compression
- :good: performance + fiops + rh 2048 + compression
- :good: performance + deadline + rh 2048 + compression
- :good: performance + sioplus + rh 2048 + compression
In general the following has to be mentioned as well:
- every single test-set will be done 3 (three!) f*** times and based on that an average will be calculated
- after each single run TWRP will be rebooted to ensure a clean start
- all tests are made in twrp v3.0.2-1
Status
Just check the above :good: marks
To be able to test that without much effort I've created a benchmark script which autostarts a twrp backup with given options via adb (will be provided later as well).
I document all that stuff in LibreOffice Calc + nice graphs. Everyone likes graphs (and tbo its the only way to see the diffs later).
You see I still need to run dozens of tests!!!
.. but for the moment it seems that sioplus and f2fs are a good choice for backing up fast but we will see the real winner at the end first..
Not surprisingly the sdcard itself is crucial for speed so I will test another sdcard which is UHS-3(!!!) at the end as well. At least for the most promising of the above test-sets.
Credits
@marn3us : yea you are the reason behind doing all this
Famous last words
Don't trust any benchmark not made by yourself. They are all telling lies.
.
Last edited:







