From: Marc Bevand Subject: Abysmal SATA throughput with =?utf-8?b?c2F0YV9zdnc=?= and ST31500341AS Date: Sun, 8 Nov 2009 00:29:47 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from lo.gmane.org ([80.91.229.12]:43787 "EHLO lo.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbZKHAfB (ORCPT ); Sat, 7 Nov 2009 19:35:01 -0500 Received: from list by lo.gmane.org with local (Exim 4.50) id 1N6vkG-0000y9-Ao for linux-ide@vger.kernel.org; Sun, 08 Nov 2009 01:35:04 +0100 Received: from cpe-76-89-196-254.socal.res.rr.com ([cpe-76-89-196-254.socal.res.rr.com]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 08 Nov 2009 01:35:04 +0100 Received: from m.bevand by cpe-76-89-196-254.socal.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 08 Nov 2009 01:35:04 +0100 Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: linux-ide@vger.kernel.org One of my machines with 4 SATA disks is resyncing a sdb, which is part of a 2-way raid1 MD array with sda, but is doing so _very_ slowly at a speed of 5-10 MByte/s. The machine is idle (no CPU, no fs activity on top of the array) and dev.raid.speed_limit_max has not been modified (left to the default value 200000). The output of iostat doesn't make sense to me: why are there 2-3 seconds periods of sdb being 100% utilized with an avgqu-sz of 4 but an avgrq-sz of 0 ?! What does this mean, that 0-byte I/O requests are being issued to the disk? [output of essentially: iostat -x 1 /dev/sdb | grep ^sdb] Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util sdb 0.00 70.00 0.00 10.00 0.00 10240.00 1024.00 3.99 448.40 100.00 100.00 sdb 0.00 63.00 0.00 9.00 0.00 9216.00 1024.00 3.98 454.67 111.11 100.00 sdb 0.00 280.00 0.00 43.00 0.00 41344.00 961.49 2.06 36.74 15.07 64.80 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.00 0.00 0.00 100.00 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.00 0.00 0.00 100.00 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.00 0.00 0.00 100.00 sdb 0.00 82.00 0.00 14.00 0.00 12288.00 877.71 3.70 975.43 66.57 93.20 sdb 0.00 32.00 0.00 11.00 0.00 8120.00 738.18 1.64 426.18 72.36 79.60 sdb 0.00 0.00 0.00 2.00 0.00 136.00 68.00 0.20 164.00 102.00 20.40 sdb 0.00 117.00 0.00 15.00 0.00 13440.00 896.00 2.87 107.20 50.13 75.20 sdb 0.00 91.00 0.00 13.00 0.00 13312.00 1024.00 3.97 344.00 76.92 100.00 sdb 0.00 87.00 0.00 13.00 0.00 13312.00 1024.00 3.99 352.62 76.92 100.00 sdb 0.00 88.00 0.00 12.00 0.00 12288.00 1024.00 3.98 290.00 83.33 100.00 sdb 0.00 274.00 0.00 42.00 0.00 40448.00 963.05 2.33 37.90 17.33 72.80 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.00 0.00 0.00 100.00 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.00 0.00 0.00 100.00 sdb 0.00 83.00 0.00 12.00 0.00 12160.00 1013.33 3.91 1063.33 83.33 100.00 sdb 0.00 98.00 0.00 14.00 0.00 14336.00 1024.00 3.96 279.71 71.43 100.00 sdb 0.00 240.00 0.00 40.00 0.00 38400.00 960.00 2.96 88.90 20.80 83.20 sdb 0.00 75.00 0.00 8.00 0.00 8064.00 1008.00 3.62 6.00 118.00 94.40 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.00 0.00 0.00 100.00 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.00 0.00 0.00 100.00 sdb 0.00 132.00 0.00 19.00 0.00 19328.00 1017.26 3.91 797.68 52.63 100.00 I first thought sdb was dying because svctm is often in the 50-100ms range, when it should be less than the typical 10-20ms latency for a 7200RPM disk given I/O ops of a max size of 512kB (avgrq-sz 1024). So I replaced it with a brand new one but it didn't change anything. In addition, the SMART data on the disks doesn't report anything suspicious. I can essentially reproduce the same abysmal performance when trying to dd /dev/zero to sdb. The 4 disks are 1.5TB Seagate 7200.11 7200RPM (ST31500341AS firmware CC1H); they are connected to a SATA controller Broadcom BCM5785 [HT1000] (module sata_svw) via the SATA backplane of a Tyan B3992 server; kernel is stock 2.6.31.1; arch is x86_64; motherboard is Tyan S3992; 2 Opteron 2350; 64GB RAM. Could the SATA backplane be the culprit? I am going to try to swap sda and sdb, or connect sdb directly to the SATA controller, bypassing the backplane. $ uname -a Linux host 2.6.31.1 #1 SMP Sat Sep 26 18:52:12 EDT 2009 x86_64 GNU/Linux $ cat /proc/mdstat Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md0 : active raid1 sdc1[2] sdb1[1] sda1[0] sdd1[3] 104320 blocks [4/4] [UUUU] md2 : active raid1 sdc5[2](F) sdd5[1] 1464734272 blocks [2/1] [_U] <-- not only sdb is slow, but sdc is failing on this server md1 : active raid1 sdb5[2] sda5[0] 1464734272 blocks [2/1] [U_] [========>............] recovery = 43.5% (637657472/1464734272) finish=1631.2min speed=8449K/sec $ cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST31500341AS Rev: CC1H Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST31500341AS Rev: CC1H Type: Direct-Access ANSI SCSI revision: 05 Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST31500341AS Rev: CC1H Type: Direct-Access ANSI SCSI revision: 05 Host: scsi3 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST31500341AS Rev: CC1H Type: Direct-Access ANSI SCSI revision: 05 Host: scsi4 Channel: 00 Id: 01 Lun: 00 Vendor: TEAC Model: DV-28E-N Rev: 1.6A Type: CD-ROM ANSI SCSI revision: 05 $ dmesg [...] [ 4.760503] sata_svw 0000:01:0e.0: version 2.3 [ 4.760576] sata_svw 0000:01:0e.0: PCI INT A -> GSI 11 (level, low) -> IRQ 11 [ 4.760685] scsi0 : sata_svw [ 4.760817] scsi1 : sata_svw [ 4.760869] scsi2 : sata_svw [ 4.760916] scsi3 : sata_svw [ 4.760943] ata1: SATA max UDMA/133 mmio m8192@0xff4fe000 port 0xff4fe000 irq 11 [ 4.760947] ata2: SATA max UDMA/133 mmio m8192@0xff4fe000 port 0xff4fe100 irq 11 [ 4.760950] ata3: SATA max UDMA/133 mmio m8192@0xff4fe000 port 0xff4fe200 irq 11 [ 4.760953] ata4: SATA max UDMA/133 mmio m8192@0xff4fe000 port 0xff4fe300 irq 11 [...] [ 5.081310] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300) [ 5.116929] ata1.00: ATA-8: ST31500341AS, CC1H, max UDMA/133 [ 5.116934] ata1.00: 2930277168 sectors, multi 16: LBA48 NCQ (depth 0/32) [ 5.175693] ata1.00: configured for UDMA/133 [ 5.175830] scsi 0:0:0:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5 [ 5.492060] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) [ 5.529385] ata2.00: ATA-8: ST31500341AS, CC1H, max UDMA/133 [ 5.529388] ata2.00: 2930277168 sectors, multi 16: LBA48 NCQ (depth 0/32) [ 5.587637] ata2.00: configured for UDMA/133 [ 5.587800] scsi 1:0:0:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5 [ 5.904053] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300) [ 5.939618] ata3.00: ATA-8: ST31500341AS, CC1H, max UDMA/133 [ 5.939621] ata3.00: 2930277168 sectors, multi 16: LBA48 NCQ (depth 0/32) [ 5.995636] ata3.00: configured for UDMA/133 [ 5.995695] scsi 2:0:0:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5 [ 6.312053] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300) [ 6.347617] ata4.00: ATA-8: ST31500341AS, CC1H, max UDMA/133 [ 6.347630] ata4.00: 2930277168 sectors, multi 16: LBA48 NCQ (depth 0/32) [ 6.403640] ata4.00: configured for UDMA/133 [ 6.403796] scsi 3:0:0:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5 [...] $ lspci -s 01:0e.0 -vvv 01:0e.0 RAID bus controller: Broadcom BCM5785 [HT1000] SATA (Native SATA Mode) (prog-if 05) Subsystem: Broadcom BCM5785 [HT1000] SATA (Native SATA Mode) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR-