Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jun 2013 18:38:27 -0700
From:      Jeremy Chadwick <jdc@koitsu.org>
To:        Dave Hayes <dave@jetcafe.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: AHCI Patsburg SATA controller and slow transfer speed
Message-ID:  <20130628013827.GB28137@icarus.home.lan>
In-Reply-To: <51CCACF5.5020901@jetcafe.org>
References:  <51CCACF5.5020901@jetcafe.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 27, 2013 at 02:21:57PM -0700, Dave Hayes wrote:
> Greetings all. I'm on FreeBSD 9.1-STABLE #0 r251391M. I'm noticing
> two of my SATA disks are at half speed. Is this normal or is there
> some configuration I'm forgetting?
> 
> # dmesg | grep -C 4 ahc
> ...
> ahci0: <Intel Patsburg AHCI SATA controller> port
> 0x2070-0x2077,0x2060-0x2063,0x2050-0x2057,0x2040-0x2043,0x2020-0x203f
> mem 0xd0b00000-0xd0b007ff irq 21 at device 31.2 on pci0
> ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported
> ahcich0: <AHCI channel> at channel 0 on ahci0
> ahcich1: <AHCI channel> at channel 1 on ahci0
> ahcich2: <AHCI channel> at channel 2 on ahci0
> ahcich3: <AHCI channel> at channel 3 on ahci0
> ahcich4: <AHCI channel> at channel 4 on ahci0
> ahcich5: <AHCI channel> at channel 5 on ahci0
> ...
> ada0: <WDC WD200MFYYZ-01D45B0 01.01K01> ATA-8 SATA 3.x device
> ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
> ada0: Command Queueing enabled
> ada0: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
> ada0: Previously was known as ad4
> ada1 at ahcich1 bus 0 scbus1 target 0 lun 0
> ada1: <WDC WD200MFYYZ-01D45B0 01.01K01> ATA-8 SATA 3.x device
> ada1: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
> ada1: Command Queueing enabled
> ada1: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
> ada1: Previously was known as ad6
> ada2 at ahcich2 bus 0 scbus2 target 0 lun 0
> ada2: <WDC WD200MFYYZ-01D45B0 01.01K01> ATA-8 SATA 3.x device
> ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
>       ^^^^^^^^^
> ada2: Command Queueing enabled
> ada2: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
> ada2: Previously was known as ad8
> ada3 at ahcich3 bus 0 scbus3 target 0 lun 0
> ada3: <WDC WD200MFYYZ-01D45B0 01.01K01> ATA-8 SATA 3.x device
> ada3: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
>       ^^^^^^^^^^^
> ada3: Command Queueing enabled
> ada3: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
> ada3: Previously was known as ad10
> # pciconf -lcvb
> ahci0@pci0:0:31:2:      class=0x010601 card=0x35ae8086
> chip=0x1d028086 rev=0x06 hdr=0x00
>     vendor     = 'Intel Corporation'
>     device     = 'Patsburg 6-Port SATA AHCI Controller'
>     class      = mass storage
>     subclass   = SATA
>     bar   [10] = type I/O Port, range 32, base 0x2070, size  8, enabled
>     bar   [14] = type I/O Port, range 32, base 0x2060, size  4, enabled
>     bar   [18] = type I/O Port, range 32, base 0x2050, size  8, enabled
>     bar   [1c] = type I/O Port, range 32, base 0x2040, size  4, enabled
>     bar   [20] = type I/O Port, range 32, base 0x2020, size 32, enabled
>     bar   [24] = type Memory, range 32, base 0xd0b00000, size 2048, enabled
>     cap 05[80] = MSI supports 1 message enabled with 1 message
>     cap 01[70] = powerspec 3  supports D0 D3  current D0
>     cap 12[a8] = SATA Index-Data Pair
>     cap 13[b0] = PCI Advanced Features: FLR TP
> 
> Thanks for any insight provided.

Intel Patsburg is otherwise known as Intel X79.  The X79
chipset/southbridge offers 6 SATA ports, 2 of which are SATA600, and the
remaining 4 are SATA300:

http://en.wikipedia.org/wiki/Intel_X79

The intention of this was to offer 2 ports for people wanting to use
SSDs (which tend to throttle themselves based on negotiated PHY speed),
and a remaining 4 ports for MHDDs or ATAPI.  You can, of course, use
whatever ports for whatever you want.

More importantly (I think): your devices are MHDDs and will never be
able to reach SATA600 (or SATA300) speeds.  Pure MHDDs which use SATA600
PHYs are somewhat of a marketing gimmick (but my gut feeling is that the
MHDD vendors are choosing to narrow the number of on-disk SATA
controllers they use).  Hybrid HDDs may benefit from faster PHYs.

Next, this statement by ahci(4) then confuses the user:

> ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported

You see, when AHCI was invented, the existing idea was that all ports
would have the same speed (and that was the case at the time).  Only
somewhat recently have some vendors begun to mix-match speeds on the
same controller -- like this one.

The AHCI specification probably (I have not read it even recently) only
provides a number indicating "the total number of ports" followed by a
single number indicating "the speed".

There may be support somewhere within AHCI to provide an updated way to
get more granular information, but I do not know if that's the case.

If there is, FreeBSD's ahci(4) driver does not support such at this
time (see sys/dev/ahci/ahci.c around line 502 for the device_printf()
call and what the arguments are (specifically AHCI_CAP_ISS and
AHCI_CAP_NPMASK)).

TL;DR -- Your motherboard offers 6 ports, 2 of which are SATA600, 4 of
which are SATA300, and despite the line shown above by FreeBSD not
matching reality, everything is working as designed.

-- 
| Jeremy Chadwick                                   jdc@koitsu.org |
| UNIX Systems Administrator                http://jdc.koitsu.org/ |
| Making life hard for others since 1977.             PGP 4BD6C0CB |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130628013827.GB28137>