Posts: 3
Joined: Mon May 20, 2013 6:10 pm

testing sdhc read/write speeds

Mon May 20, 2013 6:19 pm

I've been doing some reading about testing SDHC read/write speeds. Over on the wiki at the read and write speed cli has 'test.tmp' file within the command. What should the 'test.tmp' file contain? And how big should the file be?

Any ideas?

Posts: 18263
Joined: Tue Jul 17, 2012 3:02 pm

Re: testing sdhc read/write speeds

Mon May 20, 2013 7:59 pm

The command:

Code: Select all

$ sync; time dd if=/dev/zero of=~/test.tmp bs=500K count=1024; time sync
Starts out by doing "sync" which flushes any data that should be on disk, but is still in memory, to disk.
Then it runs "dd" under the "time" command. This writes a load of stuff to test.tmp and tells you how long it took.
Then it runs "sync" again. This time under the "time" command. This flushes everything written by "dd" command from memory buffers to disk and tells you how long it took.

I guess the idea is to add the time recorded for dd and the time taken for that second sync to give the total time to write everything to the SD.

What gets written? Well as it says, the input (if) to dd is /dev/zero. That is not a real file but a device driver that just returns an endless stream of zero bytes.

How big is test.tmp?. That would be "count" blocks times bs (block size) bytes. In this case 500 thousand times 1024. Or about 500 mega bytes.

There you go.

In my experience this kind of test often leads to a whole bunch of block errors from the SD driver followed by file system corruption. I have not found many reliable SD cards for use on the Pi or similar ARM boards running Linux.

So be sure you have your data backed up and a bunch of spare SD cards.
Memory in C++ is a leaky abstraction .

Posts: 3
Joined: Mon May 20, 2013 6:10 pm

Re: testing sdhc read/write speeds

Wed May 29, 2013 8:01 pm

Okay, so it took several days for the class 10 cards to show up. As soon as they arrived, I installed OpenElec 3.03 on them, configured to connect to my Mythbuntu (0.26) backend, activated the 'LiveTV' module and start watching live HDTV (OTA from my antenna, through HomeRunDUAL tuners controlled by my Mythbuntu backend.) My Raspberry Pi seems to start faster but, the 'top' displays of both, the Raspberry Pi and the backend server, do not appear to be different (the loads) than my class 4 cards. And audio continues to 'out run' the video. After about 30 minutes or so you appear to be watching disconnected lip movements of the live TV program action. (Does matter what HDTV channel I choose, audio out runs video, eventually.)

I have debugging enabled and the display (in the left upper corner of display) shows the frame rate dropping to single digits and I believe that is the moment the audio advances ahead of the video feed.

The network is all CAT5e wire (or better) and the switches on the network are all gigabyte speeds. So, I do not believe that my network is causing my issue.

Now, I fear that this topic moves in a different direction. What could be causing my audio/video speed separation? Any suggestions?

Posts: 3
Joined: Mon May 20, 2013 6:10 pm

Re: testing sdhc read/write speeds

Thu May 30, 2013 8:00 pm

As this is a testing device, I do not sit and watch it everyday like a normal television. Today I spent some time watching and have discovered that my device only skips video frames on one HD broadcast channel. There are four HD broadcasters in our area and the remaining channels are SD. Three of the four HD channels work fine. No frame skipping. The debug info tells me that these three channels average fps in the low to mid 20's (20-23 or so.)

The channel that is skipping frames (and therefore looses sync with the video) averages fps in the high 20's (25-29 or so.) Can this be my issue? That the fps rate is just over the capability of the Raspberry Pi to keep up?

Return to “General discussion”