[Benchmarks] File System Performance: F2FS vs EXT4

I have recently implemented Samsung's Flash Friendly File System (F2FS) into my kernel for the Z1 ( Pimped Kernel ).

In order to see what this file system really brings to the table I decided to run some benchmarks, in a controlled environment, trying to eliminate as many fluctuation factors as possible.
The methodology is described below.

For this first round, only the /data & /cache partitions were formatted as f2fs, in order to see what kind of improvement we would be able to get out of formatting /system as f2fs too later on.


Benchmarks Used 注: 没有google store,可翻墙后通过如下链接下载这些APK。

Methodology
  • Fully wiped and fresh install of the 26/03 CM nightly
  • PA Gapps installed (pa_gapps-modular-full-4.4.2-20140301-signed) & updated
  • Additionnal apps installed:
    • Pimp My Z1
    • Disk Info
    • Benchmark apps

  • No other app active in the background during benchmarks
  • Fresh reboot before running the batch of benchmarks
  • Airplane mode enabled (except for quadrant which requires an internet connection to show the results)
  • Order of the benchmarks:
    • RL Bench
    • Androbench
    • CF Bench
    • 5 minutes pause with powersave governor to cool down the device
    • 0xBenchmark
    • AnTuTu
    • Quadrant

  • Pimp My Z1 Settings:
    • CPU Governor: performance (in order to eliminate differences due to frequency scaling, as this governor just stays at max freq all the time).
    • GPU Governor: performance
    • GPU Max Freq: 600MHz
    • Intelliplug: disabled
    • Dynamic Fsync: enabled
    • I/O Scheduler: FIOPS for both emmc & sdcard
    • Readahead: 1024kb for both emmc & sdcard
    • Entropy contribution: disabled for both emmc & sdcard
    • PowerSuspend: disabled
    • KSM: enabled, 512 pages-to-scan, 500ms timer
    • Thermal throttling: disabled


Disk Usage
One thing I noted is that F2FS has a much higher usage of the /cache partition than ext4, which is to be expected coming from a log-based file system such as F2FS.
As you can see in the screenshots below ( ext4 on the left & f2fs on the right ), only 4mb out of the 192mb /cache partition is used by ext4, while f2fs uses 68% of that same partition with 114mb used.
Another thing to note is that under f2fs, the reported size of the /cache partition is apparently 2mb larger than on ext4, with 198mb.

EXT4 / F2FS
 



1. RL Bench
RL Bench is an SQLite benchmark, it only tests database read/writes with various SQL commands in various amounts.
As we can see in the results below, f2fs trumps ext4 with an overall time of only 14.417 seconds versus the 21.403 seconds of the latter.

EXT4
   

F2FS
   



2. Androbench
Androbench is supposedly an all-around I/O benchmark.
On this one, the results were so incredibly appart that I think we can safely assume a big part of these results are due to poor coding on the benchmark side.
Still, if we believe the results, f2fs provides slightly slower reads (51mbps vs 66mbps) but over 120x faster sequential writes & 300x faster random write speeds!
I had to reboot and run it a second time to make sure this wasn't an error, but the second run results were even a bit better, as you can see in the screenshots below.

EXT4
 

F2FS
1st Run
 

2nd Run
 



3. CF-Bench
CF-Bench is an overall benchmark by Chainfire which measure everything except graphics.
Here again, f2fs is the winner with a better overall score.
That being said, the native writes are a little inferior to the ext4 native write score with 529 vs 535, but has a higher native read score with 996 vs 913.

EXT4
 

F2FS
 



4. 0xBenchmark
This reliable open-source benchmark by 0xlab is an overall benchmark used by the Linaro android team during their famous toolchain demonstration.
It has the advantage to output the results in text, xml and json, which you can download below.

On the SunSpider javascript benchmark run, f2fs gets a better score with 744.5ms vs 792.0ms for ext4.
Strangely, on Linpack, ext4 gets a better score with 156mflops/s vs 122mflops/s for f2fs.
On the other hand, Scimark2 reports better mflops/s scores for f2fs in all 6 of its tests, as seen below:

EXT4 Scimark2
Results in Mflops/s
Code:
Scimark2
------------------------------------------------------------
Composite:
  191.7992650532917
Fast Fourier Transform:
  121.33004358991259
Jacobi Successive Over-relaxation:
  431.85904395507
Monte Carlo integration:
  10.79962368351458
Sparse matrix multiply:
  132.34248411160723
dense LU matrix factorization:
  262.6651299263541
F2FS Scimark2
Results in Mflops/s
Code:
Scimark2
------------------------------------------------------------
Composite:
  195.01022812596952
Fast Fourier Transform:
  125.55719947408143
Jacobi Successive Over-relaxation:
  436.3575761486842
Monte Carlo integration:
  11.192272530363814
Sparse matrix multiply:
  138.67117163604067
dense LU matrix factorization:
  263.27292084067756
EXT4 full results http://d-h.st/iER
F2FS full results http://d-h.st/iOf



5. AnTuTu Benchmark
No need for an introduction, it's probably the most popular benchmark these days.
On this one again, f2fs is the clear winner with a difference of over 1200 points.

EXT4
 

F2FS
 



6. Quadrant Benchmark
Another overall mainstream type of benchmark.
F2FS wins on this one too, with an advantage of 1100+ points.

EXT4 / F2FS
 
### GPT4All 性能基准评测 #### 测试环境配置 为了评估 GPT4All 的性能,在不同硬件平台上进行了详细的基准测试。这些平台涵盖了多种常见的消费者级别设备,包括但不限于配备 Intel Core i7 和 AMD Ryzen 9 处理器的笔记本电脑以及台式机系统[^2]。 #### 基准测试指标 主要关注以下几个方面来衡量模型的表现: - **推理速度**:每秒处理令牌数(tokens per second),这是反映模型实时响应能力的重要参数。 - **资源占用率**:CPU 使用率、内存消耗等,体现运行时对计算资源的需求程度。 - **延迟时间**:从输入请求到获得第一个有效输出之间的时间间隔,直接影响用户体验质量。 #### 实验结果概览 实验结果显示,即使是在普通的家用计算机上,GPT4All 能够保持较为稳定的性能表现。特别是在量化至 4 位精度的情况下,不仅显著降低了存储空间需求,同时也提高了执行效率,使得大多数日常对话场景下的交互变得流畅自然。 对于更复杂的任务或是大规模文本生成工作负载而言,虽然仍存在一定的局限性——比如较长的等待时间和较高的 CPU 占用比例——但对于一般用途来说已经足够胜任。此外,通过优化编译选项或调整超参数设置还可以进一步改善其效能表现[^4]。 ```python import time from gpt4all import Model model = Model('path/to/model') start_time = time.time() response = model.generate(prompt="Tell me about the weather today.") end_time = time.time() print(f"Inference took {end_time - start_time:.2f} seconds") ``` 此段 Python 代码展示了如何测量一次推断所需的具体耗时时长,这对于理解具体应用中的性能特征非常有帮助。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值