性能对比
cpu 执行效率比
- 获取CPU频率(单位: 千赫兹)
获取当前频率
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1608000
获取最大频率
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1800000
获取最小频率
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
408000
memory 频率 读写速度比较
- 获取内存频率
cat /sys/kernel/debug/clk/clk_summary
clk_scmi_ddr 0 0 0 528000000 0 0 50000
528Mhz (rate)
emmc 读写速度比较
- 测试读写速度
ls -al /dev/block/platform/fe310000.sdhci/by-name
total 0
drwxr-xr-x 2 root root 340 2022-03-23 11:43 .
drwxr-xr-x 3 root root 420 2022-03-23 11:43 ..
lrwxrwxrwx 1 root root 21 2022-03-23 11:43 backup -> /dev/block/mmcblk2p10
lrwxrwxrwx 1 root root 21 2022-03-23 11:43 baseparameter -> /dev/block/mmcblk2p13
lrwxrwxrwx 1 root root 20 2022-03-23 11:43 boot -> /dev/block/mmcblk2p8
lrwxrwxrwx 1 root root 21 2022-03-23 11:43 cache -> /dev/block/mmcblk2p11
lrwxrwxrwx 1 root root 20 2022-03-23 11:43 dtbo -> /dev/block/mmcblk2p6
lrwxrwxrwx 1 root root 21 2022-03-23 11:43 metadata -> /dev/block/mmcblk2p12
lrwxrwxrwx 1 root root 20 2022-03-23 11:43 misc -> /dev/block/mmcblk2p4
lrwxrwxrwx 1 root root 20 2022-03-23 11:43 proinfo -> /dev/block/mmcblk2p5
lrwxrwxrwx 1 root root 20 2022-03-23 11:43 recovery -> /dev/block/mmcblk2p9
lrwxrwxrwx 1 root root 20 2022-03-23 11:43 security -> /dev/block/mmcblk2p1
lrwxrwxrwx 1 root root 21 2022-03-23 11:43 super -> /dev/block/mmcblk2p14
lrwxrwxrwx 1 root root 20 2022-03-23 11:43 trust -> /dev/block/mmcblk2p3
lrwxrwxrwx 1 root root 20 2022-03-23 11:43 uboot -> /dev/block/mmcblk2p2
lrwxrwxrwx 1 root root 21 2022-03-23 11:43 userdata -> /dev/block/mmcblk2p15
//写数据到data
# busybox dd bs=400k count=512 conv=fsync if=/dev/zero of=/dev/block/mmcblk2p15
512+0 records in
512+0 records out
209715200 bytes (200.0MB) copied, 3.956148 seconds, 50.6MB/s
//清缓存 不清缓存读数据744.8MB/s
# sync;echo 3 > /proc/sys/vm/drop_caches
//读数据
# busybox dd bs=400k count=512 if=/dev/block/mmcblk2p15 of=/dev/null
512+0 records in
512+0 records out
209715200 bytes (200.0MB) copied, 1.367996 seconds, 146.2MB/s
用跑分工具也可以直观比较。