SD Cards and speed


Joined
Sep 22, 2009
Messages
221
Location
carmel, indiana - united states
Does anybody have experience with OCZ's SDHC cards?(like this one for instance) also, I wonder, does anyone know if they actually make their own SDHC cards or do they just rebadge some no name generic card?(I assume that some companies probably do this)
 
Last edited by a moderator:

Tor

Member
Joined
Oct 3, 2008
Messages
709
Don't forget that there aren't as many SD vendors as there are SD sellers (I keep having to repeat this every few weeks on the boards). There used to be only 3 SD card vendors in the world (Sandisk, Panasonic, Toshiba), there are now possibly 4, but all the rest are rebranding.
 
Last edited by a moderator:

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
12,487
Location
Somewhere off the coast of the EU
Don't forget that there aren't as many SD vendors as there are SD sellers (I keep having to repeat this every few weeks on the boards). There used to be only 3 SD card vendors in the world (Sandisk, Panasonic, Toshiba), there are now possibly 4, but all the rest are rebranding.
Good point. I thought that not all examples of other manufacturers cards were simple rebrands though. An SD card has two sorts of chip in it, as you know - the flash RAM and the controller chip. Don't some brands make their own SD cards by combining flash from one of the 3/4 manufacturers with a third party controller?
 

Yannick

Member
Joined
Sep 4, 2008
Messages
345
Age
36
Location
West-Vlaanderen, Belgium
I use alot of cheap SD cards. They never give me IO errors.


However, the are built cheap.


If they flex to much, by carrying them loose in your pocket or bumping your laptop with the card sticking out, the top and bottom split open.


Then you have to fiddle with scotch tape and hope you didn't lose the lock switch (card is read-only without the *notch* on the right place)


I also own a panasonic card, it's 128MB, 8 or 9 years old, but still in perfect condition. If build quality is what you want, this card can fill an evening with adventure stories.


In my completely unscientific opinion, SanDisk cards give the best price/performance ratio. I bought a SanDisk 16GB class 6 for my pandora, it's the fastest card i currently own.


I do have the impression, cheap SD cards are more reliable then cheap USB thumb-drives concerning IO errors. USB drives always die with my data, with SD cards its always the plastic housing.
 

Tor

Member
Joined
Oct 3, 2008
Messages
709
Don't some brands make their own SD cards by combining flash from one of the 3/4 manufacturers with a third party controller?
Could be, I don't know -- haven't heard about the practice, but it's a possibility for sure.
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
12,487
Location
Somewhere off the coast of the EU
Yeah, me neither, but I believe it's what the likes of OCZ do with their SSD drives. I haven't taken enough SD cards apart to say though personally. Personally I stick with the likes of Sandisk since then there are less supply chains involved, and less chance of fake parts making it into the final product.


@Yannick - thanks for the information
 
Last edited by a moderator:

Vitel

Active Member
Joined
May 16, 2009
Messages
561
Website
vminko.org
dd if=/dev/zero of=/media/MEDIA/test.file bs=1M count=512


class4 PNY: 92.1s, 5.8MB/s


class6 Samsung: 69.3s, 7.7MB/s


Both cards 16GB, FAT32


Read to /dev/null


Class4: 15.3MB/s


Class6: 14.7MB/s


so not much difference.
Transcend SDHC 16Gb Class10 (TS16GSDHC10):


Writing from /dev/zero to file: 10.0Mb/s.


Reading from file to /dev/null: 15.7Mb/s;
 
Last edited by a moderator:

Natro

Still Fresh
Joined
Jun 16, 2010
Messages
78
From what it looks like in the small benchmarking samples above, the SD cards of varying class ratings seem to have approximately the same read speeds. I would interpret this to mean that they would all perform about the same in the Pandora when it comes to loading and running programs from them. The main difference being how fast you could write data to them.


What I was not as sure about in my original post was how often the Pandora would access the SD card information while running various programs and if the SD card speeds would cause any bottlenecks in the performance of those programs.
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
12,487
Location
Somewhere off the coast of the EU
Yes, the conversation drifted from when you'd want a fast card to how fast we can go, to what makes you should go for - sorry ;)


I hope we answered your question about when you'd need the performance, but if not, the Pandora is just a computer like any other. Admittedly it runs Linux, but that doesn't make a lot of difference - although the Pandora will thrash less since it's running without swap, plus normally the Pandora is running the OS stored on the internal NAND flash, not SD. The SD card is only normally used for loading PND programs, and for them to save their settings and what have you, and also for you to store your music and videos and so on. A faster SD card will make it quicker to get your music and videos on there, which may be an issue if you like to change what you carry around often. As for running programs, most Pandora programs are small enough that load speed won't be very slow even on a cheap card. I'd expect ports of large programs such as Firefox will load up quicker from a quicker card though.


The benchmarking has shown that the Pandora is capable of using cards up to class 15 (not that there is a class 15 - it tops out at 10 currently), or ~100x. It's not worth spending the extra on 30MBps cards, but it can make use of 15MBps premium cards. Unfortunately different manufacturers use different speed classifications.


Hope that helps.
 

Vitel

Active Member
Joined
May 16, 2009
Messages
561
Website
vminko.org
Transcend SDHC 16Gb Class10 (TS16GSDHC10):


Writing from /dev/zero to file: 10.0Mb/s.


Reading from file to /dev/null: 15.7Mb/s;
Transcend SD 4Gb 150x (TS4GSD150):


Writing from /dev/zero to file: 15.8Mb/s.


Reading from file to /dev/null: 17.5Mb/s;
 

laurencevde

Member
Joined
Nov 17, 2008
Messages
270
Location
Enschede, The Netherlands
There's not a whole lot of difference between the (class6)-cards in max througput. 15-22MB/s read, 10-18MB/s write. Not very interesting...


However, there are quite big differences between the cards in the area of write-access-time. The Sandisk Extreme manages a write-access-time of 40ms, the Transcend Ultimate manages to take 700ms...


If you intend to use the cards for general-purpose (os, webbrowser, swap, etc), then that's what you should pay attention to. You'd quickly notice those looong access-times...( and writing a file always takes several writes...) The chosen file-system can also have a significant effect.


For just data storage, even the class-2-cards will probably do fine.


Here are some benchmarks (hard to find decent sd-benchmarks somehow...):


http://www.tomshardware.com/reviews/compactflash-sdhc-class-10,2574-7.html


http://www.tomshardware.co.uk/charts/sdhc-memory-card-charts/Workstation-Benchmark-Pattern,867.html


So, the cards I'd choose are the Sandisk Extreme (III), Lexar Professional, or the Transcend 150x SDHC Class 6 4GB. The 4GB-versions seem quite affordable now.


@vminko: Seems like you have both the worst(in write-acces-time), and one of the best cards... Could you run some write-acces-time-benchmarks on those 2 cards? Thanks. And some benchmarks with different file-systems, and a direct benchmark without the filesystem interfering(read/write to /dev/mmc....) :)
 

Vitel

Active Member
Joined
May 16, 2009
Messages
561
Website
vminko.org
Could you run some write-acces-time-benchmarks on those 2 cards?
I don't know how to do this test. Could you please provide me with a command or a script.

Thanks. And some benchmarks with different file-systems, and a direct benchmark without the filesystem interfering(read/write to /dev/mmc....) :)
Sorry but I'm too lazy to do benchmarks with different file systems. Direct benchmarks show almost the same values for both cards (10/15 and 15/18 Mbps).
 

laurencevde

Member
Joined
Nov 17, 2008
Messages
270
Location
Enschede, The Netherlands
linux keeps some nice stats in /sys/class/block/*/stat, in this order :



Code:
Name            units         description

----            -----         -----------

read I/Os       requests      number of read I/Os processed

read merges     requests      number of read I/Os merged with in-queue I/O

read sectors    sectors       number of sectors read

read ticks      milliseconds  total wait time for read requests

write I/Os      requests      number of write I/Os processed

write merges    requests      number of write I/Os merged with in-queue I/O

write sectors   sectors       number of sectors written

write ticks     milliseconds  total wait time for write requests

in_flight       requests      number of I/Os currently in flight

io_ticks        milliseconds  total time this block device has been active

time_in_queue   milliseconds  total wait time for all requests

Devide the 8th number (write ticks) with the 5th (write I/Os), and you get the average time a write I/O took. Make sure the disk suffered only a lot of random-write-ios, and you have the access-time.


So:


1: eject and reinsert the card,


2: do cat /sys/class/block/mmc*/stat (or limit to just the card you're testing), take a note of those numbers (there might have already been some writes, so to keep it clean, we'll distract those numbers)


3: do dd if=/dev/zero of=/media/MEDIA/test.file bs=512 count=10000 oflag=sync (interestingly, this causes 20000 writes...)


4: (1) again


5: subtract the relevant (5th and 8th) numbers you got in (1) from your results in (4)


6: devide the 8th number in (5) with the 5th. This is your card's write-access-time in ms.


I might whip up a script later on...
 

laurencevde

Member
Joined
Nov 17, 2008
Messages
270
Location
Enschede, The Netherlands
ok, my access-time-benchmarker


save to somewhere in your $PATH, make it executable (chmod +x <file>), and execute it somewhere your card is mounted.



Code:
#!/bin/bash

##COPYRIGHT laurencevde, 24 sep 2010, GPL-licensed

##benchmarks the latency of the drive that contains testfile 


##USAGE: latbench [testfile [block-size [count]]]

## Yes, I was lazy with parameter-parsing...


TESTFILE=${1:-"test.file"}

BS=${2:-"512"}

COUNT=${3:-"100"}


##the 'file' with the stats

STATFILE=/sys/dev/block/$(mountpoint -qd $(dirname $TESTFILE))/stat

##echo $STATFILE


##puts the contents of the statfile in an array

BEFORE=($(< $STATFILE))


dd if=/dev/zero of=$TESTFILE bs=$BS count=$COUNT oflag=sync


AFTER=($(< $STATFILE))


BEFORE_IOs=${BEFORE[4]}

BEFORE_TICKS=${BEFORE[7]}


AFTER_IOs=${AFTER[4]}

AFTER_TICKS=${AFTER[7]}


#echo ${BEFORE[*]}

#echo ${AFTER[*]}

#echo $BEFORE_IOs

#echo $BEFORE_TICKS

#echo $AFTER_IOs

#echo $AFTER_TICKS


TOTAL_IOs=$(($AFTER_IOs - $BEFORE_IOs))

TOTAL_TICKS=$(($AFTER_TICKS - $BEFORE_TICKS))


echo "total amount of write-I/O: $TOTAL_IOs"

echo "this took $TOTAL_TICKS ms"


##bash arithmetics is purely integer... put the result in microseconds to get more resolution

ACCESS_TIME=$(($TOTAL_TICKS*1000/$TOTAL_IOs))


echo "so, this device has an access-time of $ACCESS_TIME microseconds"
 
Last edited by a moderator:

Aninhumer

Guy with scary face.
Joined
Dec 13, 2005
Messages
1,156
Age
28
Website
Visit site
How about just:



Code:
time dd if=/dev/zero of=test.file count=1 bs=512
?

Not entirely fair, but should give you an idea about latency?



Code:
##bash arithmetics is purely integer... put the result in ns to get more resolution

ACCESS_TIME=$(($TOTAL_TICKS*1000/$TOTAL_IOs))


echo "so, this device has an access-time of $ACCESS_TIME ns"
Wouldn't that be micro seconds? ;)
 
Last edited by a moderator:

laurencevde

Member
Joined
Nov 17, 2008
Messages
270
Location
Enschede, The Netherlands
How about just:



Code:
time dd if=/dev/zero of=test.file count=1 bs=512
?


Not entirely fair, but should give you an idea about latency?


Wouldn't that be micro seconds? ;)
with a count of 1, the numbers seem to be much more variable, but not much higher... It's slightly more correct, but less reproduceable...


Just using dd won't do, because that write causes 4 write-I/Os on fat...


Oops about the nanoseconds :)
 
Last edited by a moderator:

Vitel

Active Member
Joined
May 16, 2009
Messages
561
Website
vminko.org
ok, my access-time-benchmarker


save to somewhere in your $PATH, make it executable (chmod +x <file>), and execute it somewhere your card is mounted.
Thank you very much.


The results (in ns) are quite strange (COUNT = 1000, FS is ext2):



Code:
BS                        | 512    | 1024   | 2048

--------------------------+--------+--------+------

Transcend TS16GSDHC10     | 5833   | 6101   | 6295

Transcend TS4GSD150       | 63630  | 56119  | 42878

Samsung MMCQE28G8MUP-0VA  | 61     | 75     | 184

Seagate ST3750640NS (XFS) | 12955  | 12487  | 13540

MMCQE28G8MUP-0VA looks suspicious. Caching?
 
Last edited by a moderator:

Christoph.Krn

Advanced Member
Joined
Mar 17, 2009
Messages
2,119
Location
Germany
There is at least one more big problem about benchmarking SD cards.


The performance of the card also depends on how well its controller handles data management. As you may know from SSDs, once the amount of data written to the card exceeds the maximum storage capacity of its flash (files that have already been deleted again are also taken into account), basically the controller has to shuffle data around, because it doesn't get informed about files you are deleting as soon as you delete them. So the more data you write onto the card, the more confused the controller gets. Eventually, it will begin fragmenting files that are being written onto the SD card, sometimes resulting in extremely high access times (depending on how well the controller can handle data management, wear leveling, lifespan and speed maintenance - if at all).


So, to reliably and kind-of-reproducable-y benchmark an SD card, you would have to reset the controller's mind as perfectly as possible (I assume using the official Panasonic SD card formatter for this is the best way to go here, since it's often unclear whether or not a card does actually adhere to the official SD card standards, and to what degree) and create quite long benchmarking sequences with different usage patterns (many IOPS, read/write many small files == "boot device"; read/write quite a few medium-sized and big files, relatively few IOPS =="media device"; above-average IOPS, above-average amount of above-average sized files: "PND storage device"). This way, many systematic problems with any given SD card would mostly become visible (in most cases - some SD cards are somewhat exotic).


As for suggesting good SD cards, I'd say that if you want a card with quite good IOPS (still not comparable to good HDDs), a long lifespan, high maximum speed, very high reliability and good data integrity, a Panasonic Gold SD card might be what you are looking for.


Also, from my totally non-representative experience, the average SanDisk cards are not quite as reliable as many people believe they are. The more expensive SanDisk Ultra with SLC flash are fine, though. But again, I have not empirically tested them (neither the Panasonic cards).
 
Last edited by a moderator:

CPUnltd

Member
Joined
Jun 27, 2010
Messages
792
Age
40
Location
Milwaukee, WI, USA
has anyone at OP looked into contacting Phoronix about their benchmarking suite? I'm sure they'd jump at the chance to put together a version of their test suite for handheld gaming devices/MIDs/UMPCs (as I have not seen anything about this yet on the phoronix site, it might be a worthwhile effort to start up)...
 

Yannick

Member
Joined
Sep 4, 2008
Messages
345
Age
36
Location
West-Vlaanderen, Belgium
I checked out phoronix test suite once. As far as i understand its writen in php5-cli and builds it's tests from source before running them. so, most of the tests should *just work* when php5 works


EDIT:


this got me thinking, what do we really care about here?


copying files speed A=>A, A=>B


unpacking compressed files A=>A, A=>B


mounting alot of pnd's (giant SD, lot's of small pnd's)


what's the best FS to format my SD card given the above questions


it's not like any sane person will run a server from his panda (btw, let me know if you do ;-) )
 
Last edited by a moderator:
Top