網頁

2020年5月18日 星期一

測試 SD Card 速度

釋放Linux記憶體
# echo 1 > /proc/sys/vm/drop_caches
釋放dentries、inodes所用的 cache memory。
# echo 2 > /proc/sys/vm/drop_caches
釋放pagecache、dentry、inode 所用的 cache memory。
# echo 3 > /proc/sys/vm/drop_caches
完全釋放cache memory,必須先執行sync,避免錯誤。
# sync

Write speed
# sync; time dd if=/dev/zero of=~/test.tmp bs=500K count=1024
Read speed
# sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
# sync; time dd if=~/test.tmp of=/dev/null bs=500K count=1024

SanDisk microSDHC 32GB Extreme U3 90MB/s
Arduino 寫速度測試
root@arduino:/mnt/sda1# sync; time dd if=/dev/zero of=test.tmp bs=500K count=1024
1024+0 records in
1024+0 records out
real    2m 25.16s
user    0m 0.04s
sys     0m 20.11s
Arduino 讀速度測試
root@arduino:/mnt/sda1# sync; echo 3|tee /proc/sys/vm/drop_caches
3
root@arduino:/mnt/sda1# sync; time dd if=test.tmp of=/dev/null bs=500k count=1024
1024+0 records in
1024+0 records out
real    0m 30.68s
user    0m 0.00s
sys     0m 8.86s
root@arduino:/mnt/sda1# uname -a
Linux arduino 3.3.8 #1 Thu Jun 2 12:28:33 CEST 2016 mips GNU/Linux
root@arduino:/mnt/sda1#
Arduino 拍照測試(不下載)
root@arduino:/# time gphoto2 --port usb:001,003 --capture-image
New file is in location /capt0000.jpg on the camera
real    0m 4.92s
user    0m 1.74s
sys     0m 0.36s
Arduino 拍照測試,下載到 Flash
root@arduino:/# time gphoto2 --port usb:001,003 --capture-image-and-download --no-keep
New file is in location /capt0000.jpg on the camera
Saving file as capt0000.jpg
Deleting file /capt0000.jpg on the camera
Deleting 'capt0000.jpg' from folder '/'...
real    0m 22.88s
user    0m 1.23s
sys     0m 8.77s
root@arduino:/#
Arduino 拍照測試,下載到 SD Card
root@arduino:/mnt/sda1# time gphoto2 --port usb:001,003 --capture-image-and-down
load --no-keep
New file is in location /capt0000.jpg on the camera
Saving file as capt0000.jpg
Deleting file /capt0000.jpg on the camera
Deleting 'capt0000.jpg' from folder '/'...
real    0m 6.53s
user    0m 1.81s
sys     0m 0.58s
root@arduino:/mnt/sda1#
RaspberryPi 寫速度測試
pi@raspberrypi:~ $ sync; echo 3| sudo tee /proc/sys/vm/drop_caches
3
pi@raspberrypi:~ $ sync; time dd if=/dev/zero of=test.tmp bs=500k count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 27.8328 s, 18.8 MB/s

real 0m27.847s
user 0m0.020s
sys 0m3.360s
RaspberryPi 讀速度測試
pi@raspberrypi:~ $ sync; echo 3| sudo tee /proc/sys/vm/drop_caches
3
pi@raspberrypi:~ $ sync; time dd if=test.tmp of=/dev/null bs=500k count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 22.8695 s, 22.9 MB/s

real 0m22.877s
user 0m0.050s
sys 0m1.340s
pi@raspberrypi:~ $ 
RaspberryPi 拍照測試(不下載)
pi@raspberrypi:~ $ time gphoto2 --port usb:001,004 --capture-image
New file is in location /capt0000.jpg on the camera                            

real 0m3.011s
user 0m0.150s
sys 0m0.100s
RaspberryPi 拍照測試(下載)
pi@raspberrypi:~ $ time gphoto2 --port usb:001,004 --capture-image-and-download --no-keep
New file is in location /capt0000.jpg on the camera                            
Saving file as capt0000.jpg
Deleting file /capt0000.jpg on the camera
Deleting 'capt0000.jpg' from folder '/'...

real 0m3.037s
user 0m0.140s
sys 0m0.140s
pi@raspberrypi:~ $ 


SanDisk ExtremePRO microSDHC UHS-I(V30) 32GB
Arduino 寫速度測試
root@arduino:/mnt/sda1# sync; time dd if=/dev/zero of=test.tmp bs=500K count=1024
1024+0 records in
1024+0 records out
real    2m 32.46s
user    0m 0.01s
sys     0m 20.18s
Arduino 讀速度測試
root@arduino:/mnt/sda1# sync; echo 3|tee /proc/sys/vm/drop_caches
3
root@arduino:/mnt/sda1# sync; time dd if=test.tmp of=/dev/null bs=500k count=1024
1024+0 records in
1024+0 records out
real    0m 30.80s
user    0m 0.00s
sys     0m 8.52s
root@arduino:/mnt/sda1#
Arduino 拍照測試(不下載)
root@arduino:/# time gphoto2 --port usb:001,003 --capture-image
New file is in location /capt0000.jpg on the camera
real    0m 4.92s
user    0m 1.74s
sys     0m 0.45s
Arduino 拍照測試,下載到 Flash
root@arduino:/# time gphoto2 --port usb:001,003 --capture-image-and-download --no-keep
New file is in location /capt0000.jpg on the camera
Saving file as capt0000.jpg
Deleting file /capt0000.jpg on the camera
Deleting 'capt0000.jpg' from folder '/'...
real    0m 22.96s
user    0m 1.19s
sys     0m 9.09s
root@arduino:/#
Arduino 拍照測試,下載到 SD Card
root@arduino:/mnt/sda1# time gphoto2 --port usb:001,003 --capture-image-and-download --no-keep
New file is in location /capt0000.jpg on the camera
Saving file as capt0000.jpg
Deleting file /capt0000.jpg on the camera
Deleting 'capt0000.jpg' from folder '/'...
real    0m 5.89s
user    0m 1.80s
sys     0m 0.45s
root@arduino:/mnt/sda1#


RaspberryPi 寫速度測試
pi@raspberrypi:~ $ sync; echo 3| sudo tee /proc/sys/vm/drop_caches
3
pi@raspberrypi:~ $ sync; time dd if=/dev/zero of=test.tmp bs=500k count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 27.6452 s, 19.0 MB/s

real 0m27.657s
user 0m0.000s
sys 0m4.020s
RaspberryPi 讀速度測試
pi@raspberrypi:~ $ sync; echo 3| sudo tee /proc/sys/vm/drop_caches
3
pi@raspberrypi:~ $ sync; time dd if=test.tmp of=/dev/null bs=500k count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 23.0098 s, 22.8 MB/s

real 0m23.020s
user 0m0.000s
sys 0m1.610s
pi@raspberrypi:~ $ 
RaspberryPi 拍照測試(不下載)
pi@raspberrypi:~ $ time gphoto2 --port usb:001,004 --capture-image
New file is in location /capt0000.jpg on the camera                          

real 0m3.053s
user 0m0.160s
sys 0m0.140s
RaspberryPi 拍照測試(下載)
pi@raspberrypi:~ $ time gphoto2 --port usb:001,004 --capture-image-and-download --no-keep
New file is in location /capt0000.jpg on the camera                          
Saving file as capt0000.jpg
Deleting file /capt0000.jpg on the camera
Deleting 'capt0000.jpg' from folder '/'...

real 0m2.994s
user 0m0.170s
sys 0m0.070s
pi@raspberrypi:~ $ 

沒有留言:

張貼留言