UFS SD Card system disk is super slow on Raspberry Pi 1 B+ (armv6l)

I have installed an official FreeBSD 13-RELEASE on Raspberry Pi 1 B+ (armv6l) with a Goodram Class 10 16GB SD Card (100 MBps R / 20 MBps W), yet the disk read/write speed is super slow (186 KBps):

# diskinfo -tv /dev/mmcsd0
Code:
/dev/mmcsd0
        512             # sectorsize
        15634268160     # mediasize in bytes (15G)
        30535680        # mediasize in sectors
        4194304         # stripesize
        0               # stripeoffset
        SDHC SD16G 2.0 SN 00000247 MFG 04/2021 by 254 42        # Disk descr.
        00000247        # Disk ident.
                        # Attachment
        Yes             # TRIM/UNMAP support
        0               # Rotation rate in RPM

Seek times:
        Full stroke:      250 iter in   0.954876 sec =    3.820 msec
        Half stroke:      250 iter in   0.946644 sec =    3.787 msec
        Quarter stroke:   500 iter in   1.888141 sec =    3.776 msec
        Short forward:    400 iter in   1.510555 sec =    3.776 msec
        Short backward:   400 iter in   1.510279 sec =    3.776 msec
        Seq outer:       2048 iter in   7.485804 sec =    3.655 msec
        Seq inner:       2048 iter in   7.220448 sec =    3.526 msec

Transfer rates:
        outside:       102400 kbytes in 549.596899 sec =      186 kbytes/sec
        middle:        102400 kbytes in 549.520508 sec =      186 kbytes/sec
        inside:        102400 kbytes in 547.767644 sec =      187 kbytes/sec

Overall system performance is super slow either (boot time is ~ 5 min).

Here is uname:
# uname -a
FreeBSD rpi-b 13.0-RELEASE FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr 9 06:30:27 UTC 2021 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm.armv6/sys/RPI-B arm


... and related dmesg output:
# dmesg | grep -i mmc
mmc0: <MMC/SD bus> on sdhci_bcm0
mmc0: Card at relative address 1 failed to set high speed timing
mmcsd0: 16GB <SDHC SD16G 2.0 SN 00000247 MFG 04/2021 by 254 42> at mmc0 0.4MHz/4bit/65535-block


The same hardware set runs Arch Linux ARM pretty fast.

Please advise, any help is appreciated.
 
Try a different SD card. The Pi is super finicky when it comes to SD cards, especially the Pi 1. Newer models are less finicky but can still have problems with certain brands. So far the Sandisk SD cards have been working fine for me.
 
So far the Sandisk SD cards have been working fine for me.
I always use Sandisk Extreme Pro, they are verrrrrrry good.

Edit: UHS-I that is, there's no point to use UHS-II, the Raspberries can't take advantage of them. See https://www.raspberrypi.org/forums/viewtopic.php?t=179876

 
I had this same issue. No matter what SD card, even those labeled as Class 10 where super slow. The key seems to be that system does not recognize them as high speed. Look that your sd card, is running at 0.4MHz:

mmcsd0: 16GB <SDHC SD16G 2.0 SN 00000247 MFG 04/2021 by 254 42> at mmc0 0.4MHz/4bit/65535-block

I was getting the exact same clock speed with two different cards on raspberry pi 3B+ and also on a raspberry pi 4.

A new SD card arrived today and it is working good at 50MHz. Mine is a Sand Disk Ultra HC I. It is class 10 U1. It also has an A1 label.

I hope it works for you too!

PS: I'm not sure why FreeBSD is not running well on other brands different than SanDisk. I've tried NetBSD on the other cards and it runs flawlessly, there is a bug somewhere I guess.
 
I have a whole bunch of Sandisk Ultra cards in different sizes (from 8GB to 128GB), those always worked fine.
I agree, Sandisk Ultras work well. You really have to watch the brand and duty cycle of SD cards.

I suggest making and mounting file systems on a thumb drive for any heavy duty I/O (test your thumb drive first).
 
Back
Top