Subject: Re: Promise SATA 300 confusion
To: None <netbsd-users@netbsd.org>
From: Jukka Salmi <j+nbsd@2007.salmi.ch>
List: netbsd-users
Date: 06/27/2007 20:40:58
--NU0Ex4SbNnrxsi6C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Jukka Salmi --> netbsd-users (2007-06-26 17:05:25 +0200):
[...]
> Hmm, any hints what could be the bottleneck here?

I've done some more rough testing to compare SATA vs. PATA read and
write speeds on wd, ccd and raid (levels 0 and 1), to and from the raw
devices and ffs respectively. I used dd(1) to write (read) 1 GiB to
(from) the device. The results are in MiB/s as reported by dd:


                        |-- SATA --|    |-- PATA --|
                        read   write    read   write

        wd:      raw      50   39         36   36
                 ffs      50   42         36   36

        ccd:     raw      91   40         72   72		
                 ffs      92   45         71   72				

        raid 0:  raw      90   40         71   73
                 ffs      90   45         68   70

        raid 1:  raw      49   21         35   36
                 ffs      49   23         35   36


Of course dd(1) is not a benchmark, but the results are - at least to
me - quite surprising: while read and write speed are always almost
identical on the PATA devices, reading from SATA devices is much faster,
but writing to them is much slower. Hmm. Not quite what I had expected.
I'd check with another sata controller if I had one...

Relevant parts of dmesg output is attached in case anybody cares.


Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~

--NU0Ex4SbNnrxsi6C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ata.sys.txt"

mainbus0 (root)
|
\-pci0 at mainbus0 bus 0: configuration mode 1
  pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
  |
  +-pdcsata0 at pci0 dev 11 function 0
  | pdcsata0: Promise PDC40718 SATA300 controller (rev. 0x02)
  | pdcsata0: interrupting at irq 7
  | pdcsata0: bus-master DMA support present
  | pdcsata0 port 1: device present, speed: 3.0Gb/s
  | pdcsata0 port 3: device present, speed: 3.0Gb/s
  | |
  | +-atabus0 at pdcsata0 channel 0
  | |
  | +-atabus1 at pdcsata0 channel 1
  | | |
  | | \-wd0 at atabus1 drive 0: <SAMSUNG HD321KJ>
  | |   wd0: drive supports 16-sector PIO transfers, LBA48 addressing
  | |   wd0: 298 GB, 620181 cyl, 16 head, 63 sec, 512 bytes/sect x 625142448 sectors
  | |   wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 7
  | |   wd0(pdcsata0:1:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
  | |
  | +-atabus2 at pdcsata0 channel 2
  | |
  | \-atabus3 at pdcsata0 channel 3
  |   |
  |   \-wd1 at atabus3 drive 0: <SAMSUNG HD321KJ>
  |     wd1: drive supports 16-sector PIO transfers, LBA48 addressing
  |     wd1: 298 GB, 620181 cyl, 16 head, 63 sec, 512 bytes/sect x 625142448 sectors
  |     wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 7
  |     wd1(pdcsata0:3:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
  |
  \-viaide0 at pci0 dev 17 function 1
    viaide0: VIA Technologies VT8235 ATA133 controller
    viaide0: bus-master DMA support present
    viaide0: primary channel configured to compatibility mode
    viaide0: primary channel interrupting at irq 14
    viaide0: secondary channel configured to compatibility mode
    viaide0: secondary channel interrupting at irq 15
    |
    +-atabus4 at viaide0 channel 0
    | |
    | +-atapibus0 at atabus4: 2 targets
    | | |
    | | \-cd0 at atapibus0 drive 1: <PLEXTOR CD-R   PX-W4012A, 438146, 1.05> cdrom removable
    | |   cd0: 32-bit data port
    | |   cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
    | |   cd0(viaide0:0:1): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
    | |
    | \-wd2 at atabus4 drive 0: <HDS728080PLAT20>
    |   wd2: drive supports 16-sector PIO transfers, LBA48 addressing
    |   wd2: 78533 MB, 159560 cyl, 16 head, 63 sec, 512 bytes/sect x 160836480 sectors
    |   wd2: 32-bit data port
    |   wd2: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
    |   wd2(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
    |
    \-atabus5 at viaide0 channel 1
      |
      \-wd3 at atabus5 drive 0: <HDS728080PLAT20>
        wd3: drive supports 16-sector PIO transfers, LBA48 addressing
        wd3: 78533 MB, 159560 cyl, 16 head, 63 sec, 512 bytes/sect x 160836480 sectors
        wd3: 32-bit data port
        wd3: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
        wd3(viaide0:1:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)

--NU0Ex4SbNnrxsi6C--