Which eMMC modules are recommended for the board?

I’m trying to pick out a 32GB or, preferably, 64GB eMMC module for my board and I’m confused on how to select the right unit.

I see units out there with a single connector, but there are two connectors on the board. I assume this is for a single module with two connectors, but I could be wrong. Can I populate this thing with two eMMC modules? No, right?

If anyone could point me in the direction of a usable eMMC module model for the visionfive2 I would really appreciate it!

Much Obliged,
The Magus Gaius Mycelius, Jocundus

Only J9 is electrically relevant, J99 is for mechanical protection.
This should bring clarity:

3 Likes

Thank you so much!

1 Like

Thank you for the info.

https://www.cdw.com/content/cdw/en/articles/hardware/emmc-vs-ssd.html#3
After reading this article, emmc and sdcards both:

  • use non-volatile nand memory for storage
  • offer very limited storage offerings max 128GB
  • do not have as many data lanes as SSDs and Nvme’s. This implies they are slower than SSD’s and Nvme’s.

Nvme’s have more data lanes than SSD’s and may be accessed to read/write in parallel.
Older generation SSD’s may have more data lanes than sdcard/emmc, but they may only be accessed sequentially if I understood correctly.

To summarize I think that means nvme > ssd > emmc and sdcard, but please correct me or crystallize if I’m wrong.

Also specifically about the VF2, it only has one pcie lane to talk with. The implies the VF2 unfortunately cannot take advantage of all those nvme parallel capability read/write lanes. I’m not sure how that detail slipped by. I do hope the VF3 will not suffer from this shortcoming.

Thank you.

1 Like

This is great info, thanks! I’m using a 1TB NVMe for my /home partition and an SD card, at present, with the debian release (with a custom updated kernel to add usbserial support) and I want to target the eMMC for developing my own os builds. The NVMe is noticeably more performant than the SD card, which is, of course, expected; even with the less than complete lane support you mention for VF2.

Fortunately eMMC will be plenty fast enough for my needs, and once I’m booting from it regularly my whole system should speed up a bit.

I went ahead and ordered the 128GB eMMC recommended in these threads. Excited to work with it!

This test dates back some time, but unfortunately I can’t take a more up-to-date measurement at the moment.

user@vfive2-8:~$ sudo hdparm --direct -t /dev/mmcblk0

/dev/mmcblk0:
 Timing O_DIRECT disk reads:  14 MB in  4.05 seconds =   3.45 MB/sec

starfive-jh7110-202302
Allnet Plug on eMMC 5.1 storage media for Rock 4 /Rock E /Rock 3A /VisionFive2 64GB version
Note: I have two VisionFive2s, one with 4GB + 32GB eMMC, and another with 8GB + 64GB eMMC.

4 Likes

Got my eMMC module installed and formatted and used your test to compare them @SunWukong. Thanks for the tip!

The mmcblk1 is the SDcard off of which I am currently booted, and the mmcblk0 is the newly installed eMMC module.

gaiusjocundus@cyberdeck:~$ sudo hdparm --direct -t /dev/mmcblk1

/dev/mmcblk1:
 Timing O_DIRECT disk reads:  64 MB in  3.01 seconds =  21.26 MB/sec
gaiusjocundus@cyberdeck:~$ sudo hdparm --direct -t /dev/mmcblk0

/dev/mmcblk0:
 Timing O_DIRECT disk reads: 110 MB in  3.00 seconds =  36.66 MB/sec

Thanks everyone for your assistance and insights!

Update: Adding nvme results for those interested:

gaiusjocundus@cyberdeck:~$ sudo hdparm --direct -t /dev/nvme0n1

/dev/nvme0n1:
 Timing O_DIRECT disk reads: 564 MB in  3.00 seconds = 187.99 MB/sec
2 Likes

For comparison, I tested a RasPiKey from UUGear, which is advertised as a Plug & Play eMMC Module for Raspberry Pi and plugs in as an SD Card.

pi@rpi18:~ $ ./inxi -Fzc0
System:
  Kernel: 5.15.61-v8+ arch: aarch64 bits: 64 Console: pty pts/0 Distro: Raspberry Pi OS 11
    (bullseye)
Machine:
  Type: ARM System: Raspberry Pi 4 Model B Rev 1.1 details: BCM2835 rev: b03111 serial: <filter>
CPU:
  Info: quad core model: N/A variant: cortex-a72 bits: 64 type: MCP cache: L2: 1024 KiB
  Speed (MHz): avg: 1500 min/max: 600/1500 cores: 1: 1500 2: 1500 3: 1500 4: 1500
Drives:
  Local Storage: total: 14.56 GiB used: 1.88 GiB (12.9%)
  ID-1: /dev/mmcblk0 model: AJTD4R size: 14.56 GiB
pi@rpi18:~ $ sudo hdparm --direct -t /dev/mmcblk0

/dev/mmcblk0:
 Timing O_DIRECT disk reads: 130 MB in  3.04 seconds =  42.74 MB/sec
2 Likes

I bought one of these:

https://www.aliexpress.us/item/2255800233334730.html

I got one of the 64MB (nominal) modules.

It works, but initially the performance was terribly - about 5 MB/second. The console showed that the MMC interface was switching the clock speed back and forth between 100 MHz, and 400 kHz. Either the module isn’t capable of running at the high-speed mode it claims to support, or my VisionFive 2 board isn’t reliable at that speed (or perhaps the module-to-board connection is marginal).

I added a simple script in /usr/local/bin/slow-mmc:

#!/bin/bash

Limit MMC0 to 50 MHz clock, as it doesn’t work reliably

at higher clock speeds.

echo 50000000 > /sys/kernel/debug/mmc0/clock

and added /etc/systemd/system/slow-mmc.service:

[Unit]
Description=Slow down MMC to 50 MHz

[Service]
ExecStart=/usr/local/bin/slow-mmc
Type=oneshot

[Install]
WantedBy=multi-user.target

and used systemctl to enable this service. Now, on reboot, the MMC clock speed is reduced to 50 MHz as soon as systemd start.

With this in place, “dd” is getting 44.8 MB/second.

3 Likes

There is something seriously wrong with these performance numbers. I just ordered a module for VF2 so don’t have it yet. But I have one which is part off Lichee Pi 4A board and my result is this:

/dev/mmcblk0:
Timing O_DIRECT disk reads: 692 MB in 3.01 seconds = 230.22 MB/sec

Also doing large compile (linux kernel) on that board using eMMC takes exact same time as using RAM via tmpfs. Which I think validates that eMMC is quite fast.

1 Like

I don’t know if downstream kernel has fixed or not, but upstream kernel already has fix applied. Using hdparm --direct -t could get about 80MB/s speed (higher speed is limited due to clock frequency)

Can you clarify which clock frequency limits the speed? I’m getting up to 45MB/sec on VF2 which is approximately the same everyone on this thread is getting. However the vendor description for the module I use says “up to 400MB/sec”. I could discount it as marketing speak, but on another Riscv board (Lichee Pi 4A) I’m getting up to 300MB/sec in the same tests.

Internal referece clock for SDMMC controller. According to clock tree in TRM, it’s only 102.4Mhz, and MMC transfer clock cannot be higher than this.

1 Like

Interesting. Doing “cat /sys/kernel/debug/mmc0/clock” on VF2 shows 100 MHz and on Lichyee Pi 4A it’s 200 MHz. So the clock rate is two times higher but the actual MMC performance is around eight times higher. There must be so other reasons I guess.

1 Like

Transfer mode is HS200, works at maximum of 200MHz in spec and at SDR mode. Fastest mode for EMMC is HS400, works at 200MHZ at DDR mode for about 400M/s. JH7110 currently work at HS200 mode+about 100MHz freq.

2 Likes

I was able to use one of my OrangePi 256GB emmc modules on the VisionFive2. Seems to be working fine.

2 Likes