Skip to contentSkip to conversation

Speed of SDHCI subsystem

DISCUSSION J.A. Magallón 2 participants 4 messages May 18, 2009 – Jun 22, 2009

lore
Share & tools
lore
#0 lore raw

Hi all...

I have notice something strange with SD cards.
I have an Aspire One and had an 8Gb SDHC card that used for my home, and have recently upgraded to a 16Gb one.
This new one came with an USB reader.

The thing is that cards look much faster when accessed through the USB key that directly on the readers of the One.

Some numbers with hdparm:

TakeMS 8Gb Class 6:
Gives 10MB/s on the slot, 17MB/s via the USB key
SanDisk UltraII 16Gb, Class 4, advertised as 15Mb/s:
Gives 10MB/s on the slot, 14MB/s on USB

I know that hdparm is not a benchmark, but I supposed it should be limited by the media, not the connection.

But somehow the SDHCI/MMC subsystem seems to be stuck at 10MB/s, independent of the quality of the media.

Any ideas ?

Signature · 4 lines
J.A. Magallon <jamagallon()ono!com>     \               Software is like sex:
                                         \         It's better when it's free
Mandriva Linux release 2010.0 (Cooker) for x86_64
Linux 2.6.29.2-desktop-1mnb (gcc 4.3.2 (GCC) #1 Wed May
#1 lore raw
Quoted 17 lines · On Tue, 19 May 2009 00:37:50 +0200 "J.A. Magallón" <[email protected]> wrote:

Hi all...

I have notice something strange with SD cards.
I have an Aspire One and had an 8Gb SDHC card that used for my home, and have recently upgraded to a 16Gb one.
This new one came with an USB reader.

The thing is that cards look much faster when accessed through the USB key that directly on the readers of the One.

Some numbers with hdparm:

TakeMS 8Gb Class 6:
Gives 10MB/s on the slot, 17MB/s via the USB key
SanDisk UltraII 16Gb, Class 4, advertised as 15Mb/s:
Gives 10MB/s on the slot, 14MB/s on USB

Quoted 8 lines

I know that hdparm is not a benchmark, but I supposed it should be limited by the media, not the connection.

But somehow the SDHCI/MMC subsystem seems to be stuck at 10MB/s, independent of the quality of the media.

Any ideas ?

Given your numbers I'd guess that your USB reader supports high-speed and your built-in one does not. The theoretical throughput without high-speed is 12.5 MB/s (SI-prefix). With some overhead, and the fact that many controllers have a lower maximum frequency than 25 MHz, makes your 10 MB/s pretty reasonable.

For reference, I've managed to achieve ~23 MB/s using a Sandisk Extreme III card and a JMicron controller, so there doesn't seem to be any major inherent bottle necks in the MMC stack.

Rgds

Signature · 10 lines
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  rdesktop, core developer          http://www.rdesktop.org
  TigerVNC, core developer          http://www.tigervnc.org

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.
#2 lore raw
Quoted 35 lines · Pierre Ossman
Quoted 17 lines · On Tue, 19 May 2009 00:37:50 +0200 "J.A. Magallón" <[email protected]> wrote:

Hi all...

I have notice something strange with SD cards.
I have an Aspire One and had an 8Gb SDHC card that used for my home, and have recently upgraded to a 16Gb one.
This new one came with an USB reader.

The thing is that cards look much faster when accessed through the USB key that directly on the readers of the One.

Some numbers with hdparm:

TakeMS 8Gb Class 6:
Gives 10MB/s on the slot, 17MB/s via the USB key
SanDisk UltraII 16Gb, Class 4, advertised as 15Mb/s:
Gives 10MB/s on the slot, 14MB/s on USB

Quoted 8 lines

I know that hdparm is not a benchmark, but I supposed it should be limited by the media, not the connection.

But somehow the SDHCI/MMC subsystem seems to be stuck at 10MB/s, independent of the quality of the media.

Any ideas ?

Given your numbers I'd guess that your USB reader supports high-speed and your built-in one does not. The theoretical throughput without high-speed is 12.5 MB/s (SI-prefix). With some overhead, and the fact that many controllers have a lower maximum frequency than 25 MHz, makes your 10 MB/s pretty reasonable.

Quoted 4 lines

For reference, I've managed to achieve ~23 MB/s using a Sandisk Extreme III card and a JMicron controller, so there doesn't seem to be any major inherent bottle necks in the MMC stack.

Thanks, now its clear it is related to hardware limits. I suppose this controler is a cheap one... Things in the Aspire One are these:

one:~# lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GME Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)
03:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
04:00.0 System peripheral: JMicron Technologies, Inc. SD/MMC Host Controller
04:00.2 SD Host controller: JMicron Technologies, Inc. Standard SD Host Controller
04:00.3 System peripheral: JMicron Technologies, Inc. MS Host Controller
04:00.4 System peripheral: JMicron Technologies, Inc. xD Host Controller
one:~# lspci -vvv -s 04:00.2
04:00.2 SD Host controller: JMicron Technologies, Inc. Standard SD Host Controller (prog-if 01)
    Subsystem: Acer Incorporated [ALI] Device 015b
    Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Interrupt: pin A routed to IRQ 19
    Region 0: Memory at 34100200 (32-bit, non-prefetchable) [size=256]
    Capabilities: [a4] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
        Status: D0 PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [80] Express (v1) Endpoint, MSI 00
        DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
        DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
            RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 128 bytes
        DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
        LnkCap: Port #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 unlimited, L1 unlimited
            ClockPM- Surprise- LLActRep- BwNot-
        LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
    Capabilities: [94] MSI: Mask- 64bit- Count=1/1 Enable-
        Address: fffffffc  Data: 0000
    Kernel modules: sdhci-pci
Signature · 4 lines
J.A. Magallon <jamagallon()ono!com>     \               Software is like sex:
                                         \         It's better when it's free
Mandriva Linux release 2010.0 (Cooker) for x86_64
Linux 2.6.29.3-desktop-1mnb (gcc 4.3.2 (GCC) #1 Wed May
#3 lore raw
Quoted 5 lines · On Wed, 17 Jun 2009 23:45:50 +0200 "J.A. Magallón" <[email protected]> wrote:

Thanks, now its clear it is related to hardware limits. I suppose this controler is a cheap one... Things in the Aspire One are these:

*snip*

Quoted 4 lines

04:00.0 System peripheral: JMicron Technologies, Inc. SD/MMC Host Controller 04:00.2 SD Host controller: JMicron Technologies, Inc. Standard SD Host Controller 04:00.3 System peripheral: JMicron Technologies, Inc. MS Host Controller 04:00.4 System peripheral: JMicron Technologies, Inc. xD Host Controller

That chip is capable of very high speeds but unfortunately the systems aren't always properly wired for it so the high-speed mode was disabled by default in the chips.

You can force it on by applying this patch:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a4b76193774b463b922cab2f92450efb20d29ef0;hp=d6d8de33415ca7598fe66d933b6556fa8f89afe2

Rgds

Signature · 10 lines
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  rdesktop, core developer          http://www.rdesktop.org
  TigerVNC, core developer          http://www.tigervnc.org

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.