On Mon, 22 Feb 2021 18:20:16 -0800 (PST), in
gmane.comp.hardware.beagleboard.user ha ppay
<
andocn777-Re5JQE...@public.gmane.org> wrote:
>For confirmation, I wrote the same image to the SD card and eMMC and
>compared the BOOT time, and the result was that eMMC was only a few seconds
>faster.
Not a valid test without knowing the details of the uSD card -- in
particular how many open "allocation units" the card supports. Cheaper
cards support only two AUs -- which is compatible with the non-journalling
FAT file system (one unit for current data file, one unit for maintaining
the FAT itself); using a journalling file system (ext4, say), can result in
a lot of flushing and loading of AUs (most impact for writing, but still
has some as the file system has to track directory files, map to inodes,
and from there to actual data blocks).
The cheaper Class-10 cards are especially bad at this, as the Class-10
rating was based upon streaming a single file (video) to/from a freshly
formatted card, whereas Class-2/4/6 are rated on transferring smaller files
(still image photos) to/from a fragmented file system (as if one has
deleted a few photos leaving gaps).
Repeating something I posted start of the month:
-=-=-=-
Note that "Class 10" cards are speed rated for STREAMING a single file
to/from a freshly formatted card (eg: video). "Class 2/4/6" cards are rated
for multiple small file writes&reads with fragmentation (eg: still photo
camera with some images deleted). Also note that all such are based upon
FAT file system -- not a journaling system.
Some card makers of "Class 10" cards take advantage of this, and fit
controllers on the card that can only track TWO "open" "allocation units"
-- the FAT table, and the data file. Every time the filesystem has to open
another file (and that happens a lot with journals -- write new contents
somewhere, write metadata to journal, sometime later wipe out original
metadata, followed by writing journal metadata and deleting journal) it has
to obtain a new allocation unit -- this involves closing and flushing the
current allocation unit to the memory, finding and erasing a free
allocation unit (erase is slow, as it has to set every bit in the unit to
"1" -- writing can only toggle a "1" bit to a "0"), then copying unchanged
data that might be in an old allocation unit before writing new data to
that unit.
Better cards will support 4 to 6 simultaneous open allocation units,
meaning one can be updating multiple files in parallel without forcing
erase cycles and copying partial units around.
From a post I made last March
>From a post (of mine) on the R-Pi group... Running the "Raspberry Pi
>Dramble microSD benchmarks".
>curl
>
https://raw.githubusercontent.com/geerlingguy/raspberry-pi-dramble/master/setup/benchmarks/microsd-benchmarks.sh
>>benchmark.sh
>
>"bdr-" is the "buffered disk read" from hdparm
>"dd-" are, well, "dd"
>The rest are "iozone" results.
>
>The BBB has
> SanDisk Edge 8GB Class 4 HC I8227DTJLT009
>Not sure of the eMMC version
>The R-Pi3B+ has
> Kingston 16GB Class 10 HC I U1 SDC10G2/16GB N0581-002.A00LF
>
>
>metric BBB (SD) RPi3B+ eMMC
>bdr-MB 21.74 21.97 hdparm did not run (tried to access SD)*
>dd-sec 89.4367 67.4917 63.8932
>dd-MB 4.7 6.2 6.6
>write 1652 250 1814
>rewrite 2306 237 1888
>read 6371 5814 5039
>reread 6375 5798 5038
>ranread 5364 5138 3562
>ranwrite 1157 234 395
>
> The Class 4 SanDisk, in the 1GHz single-core BBB readily beat the Class
>10 Kingston in a 1.4GHz quad-core R-Pi3B+ in any meaningful test (the
>Kingston only won out on the "bdr" and "dd" test cases, and the BBB eMMC
>beat it on the "dd" test). {Note: I just reran on the SD card, and
>"write"/"rewrite" only showed 405/284, which still beats the Class 10 --
>suspect if I redid the test it might improve as the SD card may have
>remnants getting reused)
The SanDisk Class 4 was easily 8 times faster than the Kingston Class
10 for regular write, rewrite, and random write, and was also faster (if
not as much) for read/reread/random read.
--
Dennis L Bieber