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

Re: SD Card performance in R-Pi onboard slot

Sun Jul 22, 2012 1:39 pm

as I think I posted already, I set up two different (wheezy & squeeze) distros with rootfs on USB drives (sticks not HDD) and in both cases after recent updates they were very slow, especially the Wheezy one. its clear people are successfully doing this so I don't understand why this has occurred, whether it's something to do with the individual USB drives (a Sandisk Cruzer 8GB and a Transcend JetFlash 32gb), the USB driver or powered hub (just the keyboard and USB drive in the hub and the mouse in the other USB port), or what. I intend to try again with the Rasbian distro once asb has got the repository updated this weekend but I'm not convinced it will be any different. it's very frustrating.

ren

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

Re: SD Card performance in R-Pi onboard slot

Sun Jul 22, 2012 2:02 pm

ren41 wrote:as I think I posted already, I set up two different (wheezy & squeeze) distros with rootfs on USB drives (sticks not HDD) and in both cases after recent updates they were very slow, especially the Wheezy one. its clear people are successfully doing this so I don't understand why this has occurred, whether it's something to do with the individual USB drives (a Sandisk Cruzer 8GB and a Transcend JetFlash 32gb), the USB driver or powered hub (just the keyboard and USB drive in the hub and the mouse in the other USB port), or what. I intend to try again with the Rasbian distro once asb has got the repository updated this weekend but I'm not convinced it will be any different. it's very frustrating.
If you want this fixed, you need to identify the change that caused the slowdown.
GitHub contains a complete history of kernels and start.elfs. If you tell me, for example it was a specific checkin to start.elf that caused the slowdown I'd sure we can remedy it.

(there was a change to start.elf on the 17th that caused a slowdown, but it was fixed on the 18th - you are sure you are not on that version?)

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

Re: SD Card performance in R-Pi onboard slot

Sun Jul 22, 2012 2:19 pm

Hi dom

yes - I know I ran raspberrypi, and also did an update from github last Sunday which was supposed to contain the most up to date firmware (dated the 14th) - I think I mentioned that on the previous post I did, which I think was on the wheezy thread. I believe the version came up as #68.

My squeeze was working really well both from the SD card and then from the USB drive prior to this but I decided to wipe that and install Rasbian. I think the smaller SD Card still has wheezy on it, I'll check. And in the meantime I will try moving the rootfs from Rasbian onto the USB drive and see what happens.

I think I said that the only thing which came up during the boot sequence was the line about GET_EVENT & TUR disagreeing but I saw that ignoring GET_EVENT was the accepted workaround for that. The powered hub (Neweer?) does appear to be USB 1 but it seemed quick enough originally on Squeeze so I don't think it can be that.

Will post back when I've done it.

ren

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

Re: SD Card performance in R-Pi onboard slot

Sun Jul 22, 2012 2:35 pm

sorry it was #168 - to be exact, it was Linux raspberry pi 3.1.9+ #168 PREEMPT Sat Jul 14 18:56:31 BST 2012 armv61

ren

Ben23
Posts: 11
Joined: Wed Jul 18, 2012 12:33 am

Re: SD Card performance in R-Pi onboard slot

Mon Jul 23, 2012 1:02 pm

Note that, when I actually got wheezy to boot, as well as being incredibly slow, my keyboard malfunctioned - keys auto-repeating by themselves, or intermittently failing to respond. The troubleshooting guides say that this suggests a power problem, but (a) it never happened with squeeze, and (b) it continued even with nothing else plugged into the Pi, with 2 different keyboards, and with 2 different chargers. It seemed like there is some sort of issue with either the power or the USB management.

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

Re: SD Card performance in R-Pi onboard slot

Wed Jul 25, 2012 7:20 am

Hi Dom

I have Raspbian on the USB stick now (Transcend JetFlash 32gb). I haven't done any actual benchmarks but it takes 90 secs to boot as opposed to 55 secs on SD card, and 90 secs from 'startx' to a fully populated lxde desktop - as opposed to 13 secs with everything on SD card.

I haven't had a chance to retry the last Wheezy image to see what happens with that.

ren

Ben23
Posts: 11
Joined: Wed Jul 18, 2012 12:33 am

Re: SD Card performance in R-Pi onboard slot

Wed Jul 25, 2012 9:38 am

Just FYI Raspbian wheezy works fine for me, with none of the problems I encountered from the Debian wheezy beta. It's still slower than squeeze to boot, but only by a few seconds possibly just due to the fact that it does more, and it seems to be a lot faster in use.

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

Re: SD Card performance in R-Pi onboard slot

Fri Jul 27, 2012 6:05 pm

OK, I got a chance this evening to move back to the SD card with my Rasbian install, from the USB stick (Transcend JetFlash 32gb). As performance was so bad I hadn't run update/upgrade or rpi-update, so I changed back purely by altering the target in cmdline.txt. The SD card is a Sandisk microSD 16GB card in an adapter - the writing on it is very faint so I can't give a serial/product number offhand.

They are -

boot to login prompt - USB drive 90 secs, SD card 24 secs
startx to fully populate lxde - USB drive 90 secs, SD card 11 secs.

I tried this originally with Squeeze and initially experienced a very marginal speed increase on the USB drive, but after I updated in mid-July I got very slow performance out of the USB drive, much slower than the times above. At the same time I did a new install of the then latest Wheezy image and compared a Sandisk Cruzer 8gb USB stick with a Sandisk 4gb class 4 SD card and got the same dreadful results with this same Transcend USB stick, 300 secs to boot to login prompt and 165 secs to fully populate lxde from startx prompt - and the same with a Sandisk Cruzer 8gb stick.

Either these two USB sticks are the worst possible options or someone somewhere must have had similar experiences! Anyone?

ren

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

Re: SD Card performance in R-Pi onboard slot

Wed Aug 01, 2012 7:28 pm

There are some sdcard improvements pushed to guthub. You can get the updates with rpi-update.

It includes lb's pull request:
"Here are two more changes for the SDHCI driver.

The extension FIFO is an additional buffer for the data register and can slightly speed up transfers, works fine for me (results might vary with SD cards, it's just barely faster with the one card I tested with). lp0 enabled it with good results, too.

The other commit tries to tackle the dataloss bug on the FAT partition some people are seeing (usually after editing config.txt)."

It also adds another command line parameter "missing_status" which significantly improves interrupt latency. It again could help USB packet loss and audio glitches. You need to enable these:
sdhci-bcm2708.missing_status=0 sdhci-bcm2708.sync_after_dma=0
added to command line. I haven't made these a default yet, but I will soon if no one complains.

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

Re: SD Card performance in R-Pi onboard slot

Wed Aug 01, 2012 8:03 pm

thanks Dom. from memory I think I already have the sync_after_dma=0 added to my cmdline.txt, from your suggestion a few weeks back. I'll update you tomorrow after I've tried it.

ren

User avatar
dhardingham
Posts: 28
Joined: Mon Jan 02, 2012 12:45 pm
Location: Stevenage, UK
Contact: Website

Re: SD Card performance in R-Pi onboard slot

Thu Aug 02, 2012 10:47 pm

Adding the new command line parameters does the trick for me. No more reboot failures after loading the newest firmware. Thanks Dom.
David Hardingham

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

Re: SD Card performance in R-Pi onboard slot

Thu Aug 02, 2012 11:10 pm

dhardingham wrote:Adding the new command line parameters does the trick for me. No more reboot failures after loading the newest firmware. Thanks Dom.
Many thanks to lb. I think his patch has fixed the FAT partition corruption. Good work!

portets
Posts: 186
Joined: Sat Oct 29, 2011 6:24 am

Re: SD Card performance in R-Pi onboard slot

Thu Aug 02, 2012 11:10 pm

Wow, don't know if it's just my sd card or what. Going from the july 25th raspbian untested repository update to this significantly reduced boot time for me. About 8 seconds shaved off. Boots to desktop in 33 seconds, down from 41.

5 year old PNY 4GB class 4

carlosfm
Posts: 132
Joined: Fri Oct 21, 2011 3:23 pm
Location: Lisbon, Portugal

Re: SD Card performance in R-Pi onboard slot

Fri Aug 03, 2012 12:24 am

I can report that after updating the firmware, I was able to boot the RPi too, while previously it failed (elf file corrupted).
But then I've done the config.txt "torture" test and it got corrupted (with "sutdown -h now").
I've made a bash script called "poweroff" that executes sync 3 times and a 5 seconds pause before the shutdown command and it seems to solve the issues.
I've put the Samsung 8GB class 10 SD card aside and with my backup image I flashed a brand new Sandisk Extreme 16GB Class 10 (45MB/s).
Time will tell if it behaves better. Anyway, I'll "poweroff" from now on.
Do you Pi?

portets
Posts: 186
Joined: Sat Oct 29, 2011 6:24 am

Re: SD Card performance in R-Pi onboard slot

Fri Aug 03, 2012 3:50 am

After unplugging my pi the latest firmware fails to boot. Rebooting was fine before I unplugged it. As does rolling back to previous elfs. No combination of config.txt or cmdline.txt parameters appears to affect this. Tried redownloading the elfs myself to no avail.

The rainbow screen comes up, is replaced by the r-pi logo, cursor flashes 3 times, no text is written, cursor disappears, frozen.

It appears to be reading the first half of the config.txt. All of my overscan settings are applied but not my framebuffer size(I can tell by the size/shape/position of the r-pi logo). Deleting everything from config.txt has no affect. arm240_start.elf works perfectly though.

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

Re: SD Card performance in R-Pi onboard slot

Fri Aug 03, 2012 10:07 am

portets wrote: It appears to be reading the first half of the config.txt. All of my overscan settings are applied but not my framebuffer size(I can tell by the size/shape/position of the r-pi logo). Deleting everything from config.txt has no affect. arm240_start.elf works perfectly though.
I'm surprised it reads *some* of config.txt. Can you try changing overscan settings and confirm they are actually acted on.

portets
Posts: 186
Joined: Sat Oct 29, 2011 6:24 am

Re: SD Card performance in R-Pi onboard slot

Fri Aug 03, 2012 10:45 am

Yeah, just checked. Overscan settings are definitely applied, but framebuffer size isn't. Doesn't matter where things are placed in the config file. Empty config file doesn't boot either. With and without the two new cmdline.txt arguments, doesn't matter. And the status led's on-board all behave completely normal aside from disk access, which turns off as soon as the r-pi logo comes up.

The weirdest part is if I use the 240 memsplit that boots fine, then replace it with any of the other memsplits and reboot, they work too. But only until I unplug the Pi. And after the Pi won't boot, it's start.elf is the same number of bytes that it should be.

All I have plugged in are a logitech wireless mouse and a logitech wired keyboard.

Maybe related to me using composite? Seems like everybody here uses hdmi, and nobody else has my issue.

carlosfm
Posts: 132
Joined: Fri Oct 21, 2011 3:23 pm
Location: Lisbon, Portugal

Re: SD Card performance in R-Pi onboard slot

Fri Aug 03, 2012 7:35 pm

portets, you may have the FAT16 boot partition corrupted.
If you make a filesystem check on this partition, on Windows or Linux, you may end up with one or more missing files, which were totally corrupted.
Replacing these files will not solve the problem, while you don't correct the filesystem errors.
This has happened to me.
Do you Pi?

portets
Posts: 186
Joined: Sat Oct 29, 2011 6:24 am

Re: SD Card performance in R-Pi onboard slot

Sun Aug 05, 2012 11:26 am

I'll have to check that out. But shouldn't the older start.elf files also not work when immediately replacing the current one? They're the same size, so I assumed the file would occupy the same exact spot as the previous file if copied after deleting it.

portets
Posts: 186
Joined: Sat Oct 29, 2011 6:24 am

Re: SD Card performance in R-Pi onboard slot

Mon Aug 06, 2012 10:17 am

Aug 05 commit appears to have fixed my issue.

NicoLarve
Posts: 1
Joined: Tue Aug 07, 2012 8:35 pm

Re: SD Card performance in R-Pi onboard slot

Tue Aug 07, 2012 8:39 pm

Hi,

I'm new to the Pi. Maybe this issue has been fixed since but nobody mentioned it here.

Here are my benchmarks (class 4 16 GB SD):

Code: Select all

[email protected] ~ $ sudo hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
 Timing cached reads:   284 MB in  2.01 seconds = 141.51 MB/sec
 Timing buffered disk reads:  56 MB in  3.02 seconds =  18.56 MB/sec

[email protected] ~ $ sudo hdparm -tT --direct /dev/mmcblk0
/dev/mmcblk0:
 Timing O_DIRECT cached reads:    44 MB in  2.07 seconds =  21.30 MB/sec
 Timing O_DIRECT disk reads:  64 MB in  3.01 seconds =  21.28 MB/sec

[email protected] ~ $ dd if=/dev/zero of=tempfile bs=1M count=512 conv=fdatasync,notrunc
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 49.4917 s, 10.8 MB/s

latki8
Posts: 31
Joined: Wed Aug 01, 2012 1:56 pm

Re: SD Card performance in R-Pi onboard slot

Tue Aug 14, 2012 11:01 am

If it is of any interest I got the following performance with Raspbian at the latest available update level using:
A 4gb Transcend SD class 6 card (as supplied by RS along with the pi model B):

[email protected] ~ $ sudo hdparm -tT /dev/mmcblk0
/dev/mmcblk0:
Timing cached reads: 288 MB in 2.01 seconds = 143.16 MB/sec
Timing buffered disk reads: 56 MB in 3.08 seconds = 18.16 MB/sec

An Integral class 10 SD card:
/dev/mmcblk0:
Timing cached reads: 288 MB in 2.01 seconds = 143.20 MB/sec
Timing buffered disk reads: 56 MB in 3.03 seconds = 18.50 MB/sec

Narf03
Posts: 243
Joined: Mon Jun 11, 2012 3:44 pm
Location: Malaysia

Re: SD Card performance in R-Pi onboard slot

Sun Aug 19, 2012 1:26 pm

Kingston 16GB class 10 ultimateX 100X as follow
[email protected] ~ $ sudo hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
Timing cached reads: 266 MB in 2.01 seconds = 132.24 MB/sec
Timing buffered disk reads: 48 MB in 3.06 seconds = 15.67 MB/sec

Image

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

Re: SD Card performance in R-Pi onboard slot

Tue Aug 28, 2012 5:37 pm

There is now latency fix improvement that should be safer than the "missing_status" one. (Thanks to ddv2005). Can you try adding:
sdhci-bcm2708.enable_llm=1 sdhci-bcm2708.sync_after_dma=0

to cmdline.txt and check if it works okay. It should improve USB/audio latency.

pfqueiros
Posts: 28
Joined: Sat Aug 04, 2012 3:04 pm
Location: Guimarães, Portugal

Re: SD Card performance in R-Pi onboard slot

Tue Aug 28, 2012 8:41 pm

dom wrote:There is now latency fix improvement that should be safer than the "missing_status" one. (Thanks to ddv2005). Can you try adding:
sdhci-bcm2708.enable_llm=1 sdhci-bcm2708.sync_after_dma=0

to cmdline.txt and check if it works okay. It should improve USB/audio latency.
Class 10 SHDC 8Gb Sandisk SD card

Before:

Code: Select all

[email protected] ~ # hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
 Timing cached reads:   120 MB in  2.02 seconds =  59.30 MB/sec
 Timing buffered disk reads:  56 MB in  3.04 seconds =  18.40 MB/sec
After:

Code: Select all

[email protected] ~ # hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
 Timing cached reads:   118 MB in  2.02 seconds =  58.52 MB/sec
 Timing buffered disk reads:  56 MB in  3.02 seconds =  18.52 MB/sec
These are very low values, no :?:

Return to “General discussion”