As I recall, Kingston does not manufacture cards -- they buy job lots from lowest bidder sources and stamp their name on the cards. Two identically labeled Kingston cards could be widely different with regards to internal circuitry.KE7FNS wrote: ↑Sat Jul 25, 2020 8:29 pm According to that list users have submitted issues with some Kingston SDHC/16gb. You really should get more detailed info on which specific part number you are using and make sure.
Just because you think there are no issues doesn't mean there aren't any issues using it with a RPi. I have a Patriot 32 gig card and when I use it everything appears to work, but every time a file is written a bit of it gets corrupted with garbage. This really causes havok during an OS update as many files are written. The longer this goes on the worse things get. That card works fine in other devices just not a RPi. Other smaller sized Patriot cards don't report the same issue.
And "Class 10" is not a guarantee that a card is suited for use with a journalling file system (which is what Linux normally uses). The Class 10 specification is based upon writing a single media stream (video) to a freshly formatted FAT file system. This allows cards that only buffer two "allocation units" [henceforth: AU] (which are typically much larger than "sectors" or "blocks" used by the file system) to run efficiently -- one AU holds the FAT bitmap, the other AU receives the video stream. When the stream AU is filled, the card physically writes it flash memory, then allocates a free AU and erases it (flash memory "writes" can only convert "1" bits in the AU into "0" bits, the AU has to be erased to convert back to all "1"), and continues recording the stream.
When such a (2 AU) card is used with a journalling file system, the OS writes the new data to some location (requires an AU erase/rewrite), writes the journal information (a log of where the new data was written -- the original directory scheme still points to the old data location; this is another AU erase/rewrite), and some time later the OS updates the main directory information using the journal (marking the original data locations free, and marks the journal free). If writes are modifying just a small file system sector/block, they still trigger a full AU erase, with the contents of the original AU copied (first to the buffer, where the new modified blocks are then written), before being committed to the flash memory.
Class 2/4/6 cards, OTOH, were rated based upon writing small files to fragmented file systems (still based on FAT but...) These cards often buffer 4 to 6 AUs at one time. As long as all file system updates occur within buffered AUs, one avoids excess erase cycles (one gets an erase cycle when the AU is first loaded for use, but with four AUs buffered, that could mean directory information, journal data, and actual data blocks are all being buffered, rather than swapping AU between data and journal, with each swap an new erase cycle). Much less wear on the flash memory, and possibly faster performance as one isn't slowed down by as many erase cycles.
From a test I'd done a while back:
Code: Select all
-=-=-=- 16 GB Kingston Class 10 in an R-Pi 3B+ (1.2GHz)
pi@rpi3bplus-1:~/benchmark$ sudo ./benchmark.sh
Raspberry Pi Dramble microSD benchmarks
microSD clock: 50.000 MHz
Running hdparm test...
/dev/mmcblk0:
HDIO_DRIVE_CMD(identify) failed: Invalid argument
Timing buffered disk reads: 66 MB in 3.02 seconds = 21.85 MB/sec
Running dd test...
51200+0 records in
51200+0 records out
419430400 bytes (419 MB, 400 MiB) copied, 54.3339 s, 7.7 MB/s
Running iozone test...
Iozone: Performance Test of File I/O
Version $Revision: 3.434 $
Compiled for 32 bit mode.
Build: linux-arm
Contributors:William Norcott, Don Capps, Isom Crawford, Kirby
Collins
Al Slater, Scott Rhine, Mike Wisner, Ken Goss
Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
Randy Dunlap, Mark Montague, Dan Million, Gavin
Brebner,
Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave
Boone,
Erik Habbinga, Kris Strecker, Walter Wong, Joshua
Root,
Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren
Sawyer,
Vangel Bojaxhi, Ben England, Vikentsi Lapa,
Alexey Skidanov.
Run began: Tue May 19 13:38:19 2020
Include fsync in write timing
O_DIRECT feature enabled
Auto Mode
File size set to 102400 kB
Record Size 4 kB
Command line used: ./iozone -e -I -a -s 100M -r 4k -i 0 -i 1 -i 2
Output is in kBytes/sec
Time Resolution = 0.000001 seconds.
Processor cache size set to 1024 kBytes.
Processor cache line size set to 32 bytes.
File stride size set to 17 * record size.
random random
bkwd record stride
kB reclen write rewrite read reread read write
read rewrite read fwrite frewrite fread freread
102400 4 264 242 5349 5803 5136 239
iozone test complete.
microSD card benchmark complete!
-=-=-=- 8 GB SanDisk Class 4 in a BeagleBone Black (1GHz)
debian@beaglebone:~/benchmark$ sudo ./benchmark.sh
[sudo] password for debian:
Raspberry Pi Dramble microSD benchmarks
Running hdparm test...
/dev/mmcblk0:
HDIO_DRIVE_CMD(identify) failed: Invalid argument
Timing buffered disk reads: 66 MB in 3.01 seconds = 21.89 MB/sec
Running dd test...
51200+0 records in
51200+0 records out
419430400 bytes (419 MB, 400 MiB) copied, 70.7736 s, 5.9 MB/s
Running iozone test...
Iozone: Performance Test of File I/O
Version $Revision: 3.434 $
Compiled for 32 bit mode.
Build: linux-arm
Contributors:William Norcott, Don Capps, Isom Crawford, Kirby
Collins
Al Slater, Scott Rhine, Mike Wisner, Ken Goss
Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
Randy Dunlap, Mark Montague, Dan Million, Gavin
Brebner,
Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave
Boone,
Erik Habbinga, Kris Strecker, Walter Wong, Joshua
Root,
Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren
Sawyer,
Vangel Bojaxhi, Ben England, Vikentsi Lapa,
Alexey Skidanov.
Run began: Tue May 19 13:26:14 2020
Include fsync in write timing
O_DIRECT feature enabled
Auto Mode
File size set to 102400 kB
Record Size 4 kB
Command line used: ./iozone -e -I -a -s 100M -r 4k -i 0 -i 1 -i 2
Output is in kBytes/sec
Time Resolution = 0.000001 seconds.
Processor cache size set to 1024 kBytes.
Processor cache line size set to 32 bytes.
File stride size set to 17 * record size.
random random
bkwd record stride
kB reclen write rewrite read reread read write
read rewrite read fwrite frewrite fread freread
102400 4 1192 1249 6587 6597 6541 635
iozone test complete.
microSD card benchmark complete!
debian@beaglebone:~/benchmark$
Things to note:
* HDPARM speeds are very close, the R-Pi at 21.85 MB/s, the "slower" BBB
at 21.89 MB/s
* DD test, R-Pi at 7.7 MB/s, BBB at 5.9 MB/s
* But iozone shows extreme differences!
Random Random
Write Rewrite Read Reread Read Write
R-Pi: 102400 4 264 242 5349 5803 5136 239
BBB: 102400 4 1192 1249 6587 6597 6541 635
Speed multiple 4.5X 5.2X 1.2X 1.1X 1.3X 2.7X