User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: SD Card performance in R-Pi onboard slot

Thu Jun 21, 2012 12:22 am

pjc123 wrote:My read speed went from 4.40 MB/sec on squeeze to 18.30 MB/sec with wheezy. Now my old Pentium 4 computer isn't ridiculously faster than the pi, just considerably faster !
SD-card read speed is no indication of CPU speed ;) i.e. your old Pentium 4 still is ridiculously faster then the pi :P

User avatar
jbeale
Posts: 3581
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: SD Card performance in R-Pi onboard slot

Thu Jun 21, 2012 12:35 am

as a practical matter of usability though, if your root file system speeds up by such a large factor, it will certainly change the feel of the device.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: SD Card performance in R-Pi onboard slot

Thu Jun 21, 2012 12:47 am

jbeale wrote:if your root file system speeds up by such a large factor, it will certainly change the feel of the device.
Yeah, totally :)
Lots of thanks to all the people in this thread for all the good work they've done on improving the SD card driver :D

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: SD Card performance in R-Pi onboard slot

Thu Jun 21, 2012 11:36 am

AndrewS wrote:
pjc123 wrote:My read speed went from 4.40 MB/sec on squeeze to 18.30 MB/sec with wheezy. Now my old Pentium 4 computer isn't ridiculously faster than the pi, just considerably faster !
SD-card read speed is no indication of CPU speed ;) i.e. your old Pentium 4 still is ridiculously faster then the pi :P
SD-card read speed is no indication of CPU speed....No s**t Sherlock ! I was not referring to cpu speed, I was referring to overall speed of the two systems (boot, starting applications, etc.). Anyway, the work that the developers did is much appreciated.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

ren41
Posts: 99
Joined: Sat May 26, 2012 8:00 pm

Re: SD Card performance in R-Pi onboard slot

Fri Jun 22, 2012 5:08 pm

with the SD card reader improvements in place, what sort of speed disparity will we see between decent SD cards and USB drives? I want to get a 32gb something very soon - at the moment I am leaning towards the USB drive for everything but booting, but I am really going to be swayed by read & write access speeds.

thank you

ren

lingon
Posts: 130
Joined: Fri Aug 26, 2011 7:31 am

Re: SD Card performance in R-Pi onboard slot

Sat Jun 23, 2012 12:31 pm

lingon wrote:
lb wrote:lingon, what kernel and firmware version are you using for the UHS-1 card? How does booting fail (at what stage, and if applicable, what kinds of errors)?

If you used the Wheezy image as-is, a manual update of kernel and firmware might help.
Today I upgraded to the Debian Wheezy Beta
uname -a
Linux raspberrypi 3.1.9+ #125 PREEMPT Sun Jun 17 16:09:36 BST 2012 armv6l GNU/Linux
This image works fine on the Transcend 8 GB card, but the SanDisk Extreme Pro 16 GB UHS-1 SDSDXP1-016G-X46 card still fails to boot from the very same image. With this new image the OK light turns green when trying to boot from the UHS-1 card. This is some progress compared to the previous Wheezy Alpha version.

My card lacks a Class 10 marking as in this picture
http://veikals.bfs.lv/images/thumbs/def ... 6g-x46.jpg

The similar SanDisk Extreme 16 GB UHS-1 card does have a Class 10 marking in addition to the UHS-1 marking.
http://www.memorycow.co.uk/image/cache/ ... 50x250.jpg

I don't know if the lack of a Class 10 marking is a problem or not. My UHS-1 card works fine with my SD-card reader though.
I used Hexxehs tool to update the kernel and firmware on the Debian Wheezy Beta image.
I was pleased to find out that now my SanDisk Extreme 16 GB UHS-1 card boots fine with this kernel:
Linux raspberrypi 3.1.9+ #135 PREEMPT Fri Jun 22 20:39:30 BST 2012 armv6l GNU/Linux :lol:
Thanks for the nice work with the boot firmware!

The following messages are seen at boot time:
dmesg | grep mmc0
[ 5.905733] Registered led device: mmc0::
[ 5.906173] mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform's DMA
[ 5.921959] mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
[ 6.094250] mmc0: problem reading SD Status register.
[ 6.145648] mmc0: new high speed SDHC card at address e624
[ 6.165684] mmcblk0: mmc0:e624 SD16G 14.8 GiB
[ 17.407499] mmc0: missed completion of cmd 17 DMA (512/512 [1]/[1]) - ignoring it
[ 17.424891] mmc0: DMA IRQ 6 ignored - results were reset

The speed is the following:
sudo hdparm -Tt /dev/mmcblk0p1
/dev/mmcblk0p1:
Timing cached reads: 300 MB in 2.01 seconds = 149.53 MB/sec
Timing buffered disk reads: 50 MB in 3.11 seconds = 16.06 MB/sec

wartstew
Posts: 14
Joined: Mon Jun 04, 2012 11:05 pm

Re: SD Card performance in R-Pi onboard slot

Sun Jun 24, 2012 2:15 am

As with my last post a few pages back, I haven't completely read everything on this thread before posting this.

First: Thanks for all the hard work in this area. I am using the official kernel with the recent patches talked about here and enjoy full speed from my SD card (8GB Class 10 Super Talent). I do get occasional temporary hangs and errors however, but much much less than before, and so far the file system on this SD card has not been corrupted.

Now the bad news: Is it possible that the RP is doing something to older, say 2-GB non-sdhc rated cards? It seems that after writing an image to two of these cards (specifically the RaspBMC image, so using what ever firmware they are using at the time), then attempting to write over the image (the last time on another computer running the Linux "dd" command), the "dd" command never completes, I see lots of I/O error messages in the dmesg log and lastly I find I can never write to that card again!!! I can read from it just fine however. As I've said this has happened twice now. I'm assuming these cards are destroyed unless someone knows some special commands to send to the SD card to fix the problem (Oh and no, the WP switch is NOT set on the SD card, and the OS does not report that the card is in WP mode).

Anyway, please keep up the good work. Too bad this has been harder than it should have been.

reggie
Posts: 151
Joined: Fri Aug 26, 2011 11:51 am

Re: SD Card performance in R-Pi onboard slot

Sun Jun 24, 2012 10:53 am

Would be useful if you could paste the error messages you are getting. It's difficult for anyone to debug stuff with such a small amount of information.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: SD Card performance in R-Pi onboard slot

Sun Jun 24, 2012 2:02 pm

wartstew wrote:Now the bad news: Is it possible that the RP is doing something to older, say 2-GB non-sdhc rated cards? It seems that after writing an image to two of these cards (specifically the RaspBMC image, so using what ever firmware they are using at the time), then attempting to write over the image (the last time on another computer running the Linux "dd" command), the "dd" command never completes, I see lots of I/O error messages in the dmesg log and lastly I find I can never write to that card again!!! I can read from it just fine however. As I've said this has happened twice now. I'm assuming these cards are destroyed unless someone knows some special commands to send to the SD card to fix the problem (Oh and no, the WP switch is NOT set on the SD card, and the OS does not report that the card is in WP mode).
I've seen other people mention https://www.sdcard.org/downloads/formatter_3 which may help?

lingon
Posts: 130
Joined: Fri Aug 26, 2011 7:31 am

Re: SD Card performance in R-Pi onboard slot

Sun Jun 24, 2012 6:43 pm

lingon wrote:
I used Hexxehs tool to update the kernel and firmware on the Debian Wheezy Beta image.
I was pleased to find out that now my SanDisk Extreme 16 GB UHS-1 card boots fine with this kernel:
Linux raspberrypi 3.1.9+ #135 PREEMPT Fri Jun 22 20:39:30 BST 2012 armv6l GNU/Linux :lol:
Thanks for the nice work with the boot firmware!
Unfortunately I got a boot problem with the SanDisk Extreme Pro 16 GB 45 MB/s card today.
Yesterday I booted without problems a couple of times, but today I get a big Rasberry Pi logo in the top left corner of the screen and a white underscore character beneath it and then the machine hangs every time. Actually I saw this once yesterday, but then I could not reproduce it. Today I have not been able to boot even once from the SanDisk Extreme Pro card.
Has someone seen the Raspberry Pi hang like this with a big logo on the screen?

I was able to read the boot partition in another Linux box without problems so it seems to be fine, but I need to make really sure that my image has not been corrupted.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: SD Card performance in R-Pi onboard slot

Mon Jun 25, 2012 11:48 am

lingon wrote:Has someone seen the Raspberry Pi hang like this with a big logo on the screen?
Sounds like http://www.raspberrypi.org/phpBB3/viewt ... 24#p108024

lingon
Posts: 130
Joined: Fri Aug 26, 2011 7:31 am

Re: SD Card performance in R-Pi onboard slot

Mon Jun 25, 2012 5:54 pm

I let the Raspberry Pi be off for a couple of hours later yesterday to cool off. I then used a 2 GB Transcend card to boot it. Once it had booted I tried once more to boot from the SanDisk Extreme Pro 16 GB UHS-1 card and this time it booted from the UHS-1 card! I kept it on for about 24 hours and now I have booted it about 10 times in a row without problems with the 16 GB UHS-1 card. I saw on the Raspberry Pi trouble shooting section that others has reported unreliable booting
http://elinux.org/R-Pi_Troubleshooting# ... not_always
Hopefully this and similar issues will be understood and resolved by a firmware upgrade.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5409
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: SD Card performance in R-Pi onboard slot

Mon Jun 25, 2012 6:19 pm

lingon wrote:Hopefully this and similar issues will be understood and resolved by a firmware upgrade.
https://github.com/raspberrypi/firmware ... 5506abd1f8
(bootcode.bin specifically) might fix it for you. A number of people with non-booting sdcards (including myself with a Sandisk Extreme) can now boot reliably after this update.

honda4life
Posts: 75
Joined: Thu Mar 15, 2012 7:27 pm

Re: SD Card performance in R-Pi onboard slot

Mon Jun 25, 2012 7:13 pm

Compiled my own kernel from GIT.
I assume patches are included?

Is /boot/ the fat32 partition? (where config.txt should be).
No config.txt found :cry:
I assume default value is 50 MHz? now?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5409
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: SD Card performance in R-Pi onboard slot

Mon Jun 25, 2012 7:20 pm

honda4life wrote: Is /boot/ the fat32 partition? (where config.txt should be).
No config.txt found :cry:
I assume default value is 50 MHz? now?
Yes, the FAT partition windows can see (or /boot from pi). Just create config.txt if the file isn't there.
Default is 50MHz.

davka003
Posts: 12
Joined: Tue Jan 24, 2012 11:54 am

Re: SD Card performance in R-Pi onboard slot

Mon Jun 25, 2012 7:48 pm

Thanks for all your hardwork on SD-card performance, have had severe problems with those

Code: Select all

[ 1424.218607] mmc0: final write to SD card still running
[ 1434.086510] mmc0: Timeout waiting for hardware interrupt - cmd12.
[ 1434.086676] mmcblk0: error -110 sending stop command, original cmd response 0x900, card 
But found the rpi-update tool and as of today the problems seems to have gone away. They wasn't gone with the version fetched on June 20 thou.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: SD Card performance in R-Pi onboard slot

Mon Jun 25, 2012 11:03 pm

Lob0426 wrote:@lb I have a SanDisk ultra 8GB class 6 that quit working after the new kernel. The kernel is 3.2.19+ 3. From Chris' site. No matter what I did it would fail just after the keyboard loaded. Then it times out waiting for interrupt. Hope this helps. It is a brand new card.
This card has decided to work with wheezy.

It still would not work with Squeeze, even though it had worked before. Even when I reimaged it back to the 4/19 image it would not work.

A score for Wheezy.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

davka003
Posts: 12
Joined: Tue Jan 24, 2012 11:54 am

Re: SD Card performance in R-Pi onboard slot

Tue Jun 26, 2012 4:16 pm

davka003 wrote:Thanks for all your hardwork on SD-card performance, have had severe problems with those

Code: Select all

[ 1424.218607] mmc0: final write to SD card still running
[ 1434.086510] mmc0: Timeout waiting for hardware interrupt - cmd12.
[ 1434.086676] mmcblk0: error -110 sending stop command, original cmd response 0x900, card 
But found the rpi-update tool and as of today the problems seems to have gone away. They wasn't gone with the version fetched on June 20 thou.
I was wrong, the problem seemed to have gone away but is still present but somewhat reduced in frequncy (now I just have a hundred or so per 24 h) and my processes seems to cope with it better (not silently crashing).

Any ideas?
Thanks
David

xtramural
Posts: 108
Joined: Thu Dec 29, 2011 11:16 pm
Location: Scotland

Re: SD Card performance in R-Pi onboard slot

Sat Jul 07, 2012 7:38 pm

I have a newly imaged, apt-get update'd, apt-get upgrade'd and rpi-update'd Wheezy on a Transcend 8GB Class 6 and have also suffered the following types of mmc error (but only infrequently):

Code: Select all

[ 1984.535709] mmc0: final write to SD card still running
[ 1994.408120] mmc0: Timeout waiting for hardware interrupt - cmd12.
[ 1994.409315] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
I assume that this is a potential source of SD card corruption but am seeking advice on whether this is actually the case.
4.8V between TP1 and TP2.

I believe this card also suffered the same fate in Squeeze but since I have a number of cards can't be sure.

PaulCheffus
Posts: 381
Joined: Tue May 29, 2012 2:51 pm
Location: Lincolnshire UK

Re: SD Card performance in R-Pi onboard slot

Tue Jul 10, 2012 9:59 pm

lb wrote:
dom wrote: [ 21.317631] mmc0: missed completion of cmd 17 DMA (512/512 [1]/[1]) - ignoring it
[ 21.331364] mmc0: DMA IRQ 6 ignored - results were reset
I think it's harmless. CMD17 is a single-block read. This is seldom used, and maybe the command simply finishes too quickly for the controller.
Hi

Over the last couple of days mine was showing this once on boot, however, tonight I did a apt-get update, apt-get upgrade followed by Rpi-update and it has now appeared four times during boot one after another.

Cheers

Paul
Procrastination - The Thief of Time.

ren41
Posts: 99
Joined: Sat May 26, 2012 8:00 pm

Re: SD Card performance in R-Pi onboard slot

Tue Jul 17, 2012 9:02 am

I've seen a comment to the effect that SD card timing issues have been addressed in a recent update. Would that be the rpi-update from July 14th?

The distro I have been using most is Squeeze, and it has seemed quite fast, especially using xfce and chromium for browsing. I ran rpi-update on Sunday and now it is extremely slow, taking 90 secs or more to boot up, and 3 mins 15 secs to startx into xfce (previously 6 secs). Everything is VERY slow. I forced it to do an update & upgrade this morning but it hasn't helped. It is still 3.1.9+ #168 and really unusable. I am wondering if the SD Card update could be (part of) the issue, although I am running off a USB drive after boot and the lack of speed persists past boot.

The card is a 16gb Sandisk microSD in an adapter and as I said, prior to this latest update it's had no problems.

I think I may have to try a fresh install to see if the problem persists. I have various bits of software etc installed with this distro and that obviously won't be overwritten as it's all on the USB drive but I'm not sure what, if anything, I will need to change/copy onto /root, as well as the new /boot contents.

ren

lb
Posts: 263
Joined: Sat Jan 28, 2012 8:07 pm

Re: SD Card performance in R-Pi onboard slot

Tue Jul 17, 2012 10:13 am

The SD fixes are quite old (in the Pi timescale). They have been introduced June 13. Any errors or the like in the kernel log?

ren41
Posts: 99
Joined: Sat May 26, 2012 8:00 pm

Re: SD Card performance in R-Pi onboard slot

Tue Jul 17, 2012 10:55 am

I have updated previously, in fact I usually do it every week. It's been bothering me that, having checked on git-hub, the most recent update appears to be June 13th.

I think - looking back at Sunday's browsing history - what I used was the latest kernel etc from raspberrypi/firmware. It does say pre-compiled binaries of the latest Raspberry Pi kernel etc - but I suspect I have created an incompatibility or two somewhere. I must learn to leave well alone.

I think I'm just going to have to do a fresh install.

ren

ren41
Posts: 99
Joined: Sat May 26, 2012 8:00 pm

Re: SD Card performance in R-Pi onboard slot

Tue Jul 17, 2012 12:40 pm

I forgot to check the kernel log; I have now and there are no obvious errors, although it mainly seems to think it's Jan 1st 1970.... I can post if anyone wants to interpret any of the values, which don't mean much to me.

ren

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5409
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: SD Card performance in R-Pi onboard slot

Tue Jul 17, 2012 12:48 pm

Currently the sdcard driver busy waits after DMA completes until the card becomes idle before sending a stop signal.

The busy wait delays other interrupts in the system, so could cause interference to other drivers. It could in theory cause audio glitches or USB packet loss.
It also wastes cycles that could be productively spent elsewhere.

Both myself and lb have been running with this the last few weeks with no ill effects. We'd like more people to test it.

I've pushed an update (you can get through rpi-update). It adds a kernel commandline option:
sdhci-bcm2708.sync_after_dma=0

Add that to your cmdline.txt, and report if there's any change in behaviour.
Don't forget to back up, just in case there's any problems.

Return to “General discussion”