Micro SD card performance with the Gemini PDA
Recently, when writing the article Some first tests with the Gemini PDA, I have noticed the ridiculous slow micro SD card I/O performance with Android. Because of this, later on, I did some further testing with Debian installed on the Gemini. After booting the device, the micro SD card read speed looks good, but after having the device suspended (i.e. closing the lid) the speed drops to about 20 MB/sec, which is consistent with the result of the Android test. So most probably this also has been after a suspend. To pinpoint the problem a bit more, a more extensive test setup has been carried out.
Test setup
For this performance test the common tool hdparm has been used. On Debian based systems it can be installed from a root shell:
root@gemini:/home/gemini# apt-get install hdparm
Its usage for the test is quite simple:
root@gemini:/home/gemini# hdparm -t /dev/mmcblk1 /dev/mmcblk1: Timing buffered disk reads: 62 MB in 3.05 seconds = 20.34 MB/sec
To make sure that the problem is not limited to the SD card that has been tried out initially, the test has been carried out with four different cards:
•SanDisk Ultra 200GB microSDXC Speicherkarte, Class 10, U1, A1
•Samsung EVO Plus Micro SDXC 128GB, Class 10, U3
•Samsung EVO MicroSDHC 64GB, UHS-I, Grade 1, Class 10
•SanDisk Ultra microSDXC 64GB, UHS-I, Class 10
The four tested cards are being shown in the photo below.
For each card the read speed has been measured directly after startup and after closing the lid and reopening it. To ensure not to use fake or broken SD cards, all the cards also have been tested using a laptop with Gentoo Linux and a USB 3 card reader (Transcend TS-RDF8K). These speeds then can be compared to the results with the Gemini.
Results
The following table shows the results of the test as well as the “official” speed rating of the cards.
SanDisk Ultra 200GB | Samsung EVO Plus 128GB | Samsung EVO 64GB | SanDisk Ultra 64GB | |
---|---|---|---|---|
after boot | 58.5 MB/s | 39.0 MB/s | 34.3 MB/s | 30.4 MB/s |
after resume | 19.8 MB/s | 13.1 MB/s | 19.3 MB/s | 19.2 MB/s |
with PC | 84.4 MB/s | 68.3 MB/s | 44.7 MB/s | 35.8 MB/s |
rated speed | 100 MB/s | 100 MB/s | 48 MB/s | 30 MB/s |
The measured speed of the two older 64GB cards is quite close to the rated speed, but the performance of the two 100MB/sec rated cards is far too low. Especially the results for the 128GB Samsung EVO are catastrophic. With the Gemini these cards operate at 57% respectively 69% of the speed measured with the laptop. After suspending the Gemini the read speed of all cards drops below 20 MB/sec. The initial higher speed can only be achieved by rebooting the device. The results with the cards inserted into an external card reader attached to a laptop show that the cards generally are in a good working condition.
Conclusion
The test shows, that there is a performance issue with the Gemini PDA and micro SD cards. The higher rated cards operate far below their capabilities. For all the cards, the speed drops below 20 MB/sec after a suspend cycle. Thus, most probably there is a bug inside the Mediatek driver for the SD card reader, that prevents the cards from operating at high speed after a suspend cycle. Also it might be possible to optimize the driver for newer cards. Hopefully these issues get resolved when the Gemini gets Android Oreo and a 4.X Linux kernel with it.
Jürgen
August 23rd, 2019 at 5:27 pm
Many thanks for this article. I recently upgraded my SD card from a SanDisk Extreme Pro 64GB to a Samsung Evo Plus 256GB.
After installing the new card, I formatted it back as adoptable storage and benched it. It reported acceptable speeds (65.13MBps read and 37.48MBps write) so I migrated the apps and data from internal to it and then copied my multimedia directory back onto it from external backup.
Everything seemed to work fine, but then after using it for a few days, I noticed some of the apps which were migrated to the adoptable storage would freeze and T-UI which would also hang with a white screen. T-UI has been rock solid so this surprised me.
After benching again I saw the speed drop. Thank goodness for your article pointing out that suspend was causing it.
The thing that concerns me is that with the 64GB card I never noticed any slow downs, but I never benched it recently. The old card was formatted with Android 7, and my new card is formatted with Android 8 and has the bug where it shows double the size in the GUI. df shows the correct size…
I’ve since re-purposed the 64GB card in my Pi 4, so I’ve lost the chance to test if it was due to how the card was formatted, but due to the date of your articles I’m guessing that your tests were done on Android 7…
I’ve ordered the 128GB version of the SanDisk and will try that out and if that doesn’t work I’ll try the 64GB card again.
I will be surprised if the slow after suspend issue was affecting me the whole time since I use my Gemini a lot each day. I use it as more of a traditional PDA, but specifically for all my 2FA apps, password managers and to SSH to servers if I’m not at my desk.
August 24th, 2019 at 5:35 pm
I brought the 128GB version of the SanDisk Extreme Pro and did some additional testing. There is a slow down after suspend with all 3 of the SD cards I tested using A1 SD Bench.
I also tested the Samsung Evo with f3 to ensure that it was a valid card. It passed the test with no errors. On an interesting note, whilst gnome-disk reports the SD card near the marketed speeds, f3 reports it much differently!
f3 write speed started at 72.89 MB/s and slowed down to 25.86
Average writing speed: 29.50 MB/s
Test passed with no issues
The following is the speed test of the 3 cards with the Gemini PDA (stock Android 8 from PC):
| Card | Device | Mode | Read (MB/s) | Write (MB/s) | Notes |
|:———————————————–|:———–|:———-|:————|:————-|:———————————————|
| 1. Samsung Evo Plus 256 GB C10 U3 | Gemini PDA | Portable | 65.13 | 37.48 | A1 SD Bench – Right after reboot, no suspend |
| 1. Samsung Evo Plus 256 GB C10 U3 | Gemini PDA | Portable | 18.52 | 17.60 | A1 SD Bench – After suspend |
| 1. SanDisk Extreme Pro 64 GB C10 U3 V30 | Gemini PDA | Portable | 65.84 | 52.74 | A1 SD Bench – Right after reboot, no suspend |
| 1. SanDisk Extreme Pro 64 GB C10 U3 V30 | Gemini PDA | Portable | 59.16 | 41.70 | A1 SD Bench – After suspend |
| 1. SanDisk Extreme Pro 64 GB C10 U3 V30 | Gemini PDA | Adoptable | 61.50 | 68.00 | A1 SD Bench – Right after reboot, no suspend |
| 1. SanDisk Extreme Pro 64 GB C10 U3 V30 | Gemini PDA | Adoptable | 46.42 | 79.09 | A1 SD Bench – After suspend |
| 1. SanDisk Extreme Pro 128 GB C10 UHS-1 U3 V30 | Gemini PDA | Portable | 61.35 | 38.09 | A1 SD Bench – Right after reboot, no suspend |
| 1. SanDisk Extreme Pro 128 GB C10 UHS-1 U3 V30 | Gemini PDA | Portable | 59.59 | 39.73 | A1 SD Bench – After suspend |
| 1. SanDisk Extreme Pro 64 GB C10 UHS-1 U3 V30 | Gemini PDA | Adoptable | 53.06 | 67.65 | A1 SD Bench – Right after reboot, no suspend |
| 1. SanDisk Extreme Pro 64 GB C10 UHS-1 U3 V30 | Gemini PDA | Adoptable | 42.44 | 77.50 | A1 SD Bench – After suspend |
I didn’t retest the Samsung Evo in adoptable mode, but from early benchmarks it had as speed of 15.57 read and 21.11 write(MB/s).
No idea why write speed is always faster in adoptable mode, maybe some caching is going on?