Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A26719FA17A for ; Thu, 30 Nov 2006 20:44:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 44719-09 for ; Thu, 30 Nov 2006 20:44:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from server.linux27.com (server.linux27.com [72.232.77.42]) by postgresql.org (Postfix) with ESMTP id 9FDF49FA282 for ; Thu, 30 Nov 2006 20:44:22 -0400 (AST) Received: from [201.67.131.73] (port=25819 helo=PC1) by server.linux27.com with esmtpa (Exim 4.52) id 1GpwVm-0007Bd-5G for pgsql-performance@postgresql.org; Thu, 30 Nov 2006 22:44:20 -0200 Reply-To: From: "Carlos H. Reimer" To: Subject: Bad iostat numbers Date: Thu, 30 Nov 2006 22:44:25 -0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0089_01C714D1.1620B0B0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.linux27.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - opendb.com.br X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/278 X-Sequence-Number: 22048 This is a multi-part message in MIME format. ------=_NextPart_000_0089_01C714D1.1620B0B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Hi, I was called to find out why one of our PostgreSQL servers has not a satisfatory response time. The server has only two SCSI disks configurated as a RAID1 software. While collecting performance data I discovered very bad numbers in the I/O subsystem and I would like to know if I´m thinking correctly. Here is a typical iostat -x: avg-cpu: %user %nice %system %iowait %idle 50.40 0.00 0.50 1.10 48.00 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util sda 0.00 7.80 0.40 6.40 41.60 113.60 20.80 56.80 22.82 570697.50 10.59 147.06 100.00 sdb 0.20 7.80 0.60 6.40 40.00 113.60 20.00 56.80 21.94 570697.50 9.83 142.86 100.00 md1 0.00 0.00 1.20 13.40 81.60 107.20 40.80 53.60 12.93 0.00 0.00 0.00 0.00 md0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 Are they not saturated? What kind of parameters should I pay attention when comparing SCSI controllers and disks? I would like to discover how much cache is present in the controller, how can I find this value from Linux? Thank you in advance! dmesg output: ... SCSI subsystem initialized ACPI: PCI Interrupt 0000:04:02.0[A] -> GSI 18 (level, low) -> IRQ 18 scsi0 : Adaptec AIC79XX PCI-X SCSI HBA DRIVER, Rev 3.0 aic7902: Ultra320 Wide Channel A, SCSI Id=7, PCI 33 or 66Mhz, 512 SCBs Vendor: SEAGATE Model: ST336607LW Rev: DS10 Type: Direct-Access ANSI SCSI revision: 03 target0:0:0: asynchronous scsi0:A:0:0: Tagged Queuing enabled. Depth 4 target0:0:0: Beginning Domain Validation target0:0:0: wide asynchronous target0:0:0: FAST-160 WIDE SCSI 320.0 MB/s DT IU QAS RDSTRM RTI WRFLOW PCOMP (6.25 ns, offset 63) target0:0:0: Ending Domain Validation SCSI device sda: 71132959 512-byte hdwr sectors (36420 MB) sda: Write Protect is off sda: Mode Sense: ab 00 10 08 SCSI device sda: drive cache: write back w/ FUA SCSI device sda: 71132959 512-byte hdwr sectors (36420 MB) sda: Write Protect is off sda: Mode Sense: ab 00 10 08 SCSI device sda: drive cache: write back w/ FUA sda: sda1 sda2 sda3 sd 0:0:0:0: Attached scsi disk sda Vendor: SEAGATE Model: ST336607LW Rev: DS10 Type: Direct-Access ANSI SCSI revision: 03 target0:0:1: asynchronous scsi0:A:1:0: Tagged Queuing enabled. Depth 4 target0:0:1: Beginning Domain Validation target0:0:1: wide asynchronous target0:0:1: FAST-160 WIDE SCSI 320.0 MB/s DT IU QAS RDSTRM RTI WRFLOW PCOMP (6.25 ns, offset 63) target0:0:1: Ending Domain Validation SCSI device sdb: 71132959 512-byte hdwr sectors (36420 MB) sdb: Write Protect is off sdb: Mode Sense: ab 00 10 08 SCSI device sdb: drive cache: write back w/ FUA SCSI device sdb: 71132959 512-byte hdwr sectors (36420 MB) sdb: Write Protect is off sdb: Mode Sense: ab 00 10 08 SCSI device sdb: drive cache: write back w/ FUA sdb: sdb1 sdb2 sdb3 sd 0:0:1:0: Attached scsi disk sdb ACPI: PCI Interrupt 0000:04:02.1[B] -> GSI 19 (level, low) -> IRQ 19 scsi1 : Adaptec AIC79XX PCI-X SCSI HBA DRIVER, Rev 3.0 aic7902: Ultra320 Wide Channel B, SCSI Id=7, PCI 33 or 66Mhz, 512 SCBs ... Reimer ------=_NextPart_000_0089_01C714D1.1620B0B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I was = called to=20 find out why one of our PostgreSQL servers has not a satisfatory = response=20 time. The server has only two SCSI disks configurated as a RAID1=20 software.
 
While collecting performance data I = discovered=20 very bad numbers in the I/O subsystem and I would like to know if I=B4m = thinking=20 correctly.
 
Here = is a typical=20 iostat -x:
 

avg-cpu:  = %user   %nice %system = %iowait   %idle

         =20 50.40    = 0.00    0.50    1.10   = 48.00

 

Device:    = rrqm/s=20 wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz = avgqu-sz   await  svctm  = %util

sda         =20 0.00   = 7.80  0.40  6.40   41.60  113.60    20.80    56.80    22.82 = 570697.50   10.59 147.06=20 100.00

sdb         =20 0.20   = 7.80  0.60  6.40   40.00  113.60    20.00    56.80    21.94 = 570697.50    9.83 142.86=20 100.00

md1         =20 0.00   = 0.00  1.20 13.40   81.60  107.20    40.80    53.60    12.93     0.00    0.00   0.00   = 0.00

md0         =20 0.00   = 0.00  0.00  0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

 

Are they not=20 saturated?

 

What kind of parameters should = I pay=20 attention when comparing SCSI controllers and disks? I would like to = discover=20 how much cache is present in the controller, how can I find this value = from=20 Linux?

 

Thank you in=20 advance!

 

dmesg = output:

...

SCSI subsystem=20 initialized

ACPI: PCI Interrupt = 0000:04:02.0[A] ->=20 GSI 18 (level, low) -> IRQ 18

scsi0 : Adaptec AIC79XX PCI-X = SCSI HBA=20 DRIVER, Rev 3.0

       =20 <Adaptec (Dell OEM) 39320 Ultra320 SCSI = adapter>

       =20 aic7902: Ultra320 Wide Channel A, SCSI Id=3D7, PCI 33 or 66Mhz, 512=20 SCBs

 

  Vendor: = SEAGATE   Model:=20 ST336607LW        Rev:=20 DS10

  Type:  =20 Direct-Access          =            =20 ANSI SCSI revision: 03

 target0:0:0:=20 asynchronous

scsi0:A:0:0: Tagged Queuing = enabled. =20 Depth 4

 target0:0:0: Beginning = Domain=20 Validation

 target0:0:0: wide=20 asynchronous

 target0:0:0: FAST-160 = WIDE SCSI=20 320.0 MB/s DT IU QAS RDSTRM RTI WRFLOW PCOMP (6.25 ns, offset=20 63)

 target0:0:0: Ending = Domain=20 Validation

SCSI device sda: 71132959 = 512-byte hdwr=20 sectors (36420 MB)

sda: Write Protect is=20 off

sda: Mode Sense: ab 00 10=20 08

SCSI device sda: drive cache: = write back=20 w/ FUA

SCSI device sda: 71132959 = 512-byte hdwr=20 sectors (36420 MB)

sda: Write Protect is=20 off

sda: Mode Sense: ab 00 10=20 08

SCSI device sda: drive cache: = write back=20 w/ FUA

 sda: sda1 sda2=20 sda3

sd 0:0:0:0: Attached scsi disk = sda

  Vendor: = SEAGATE   Model:=20 ST336607LW        Rev:=20 DS10

  Type:  =20 Direct-Access          =            =20 ANSI SCSI revision: 03

 target0:0:1:=20 asynchronous

scsi0:A:1:0: Tagged Queuing = enabled. =20 Depth 4

 target0:0:1: Beginning = Domain=20 Validation

 target0:0:1: wide=20 asynchronous

 target0:0:1: FAST-160 = WIDE SCSI=20 320.0 MB/s DT IU QAS RDSTRM RTI WRFLOW PCOMP (6.25 ns, offset=20 63)

 target0:0:1: Ending = Domain=20 Validation

SCSI device sdb: 71132959 = 512-byte hdwr=20 sectors (36420 MB)

sdb: Write Protect is=20 off

sdb: Mode Sense: ab 00 10=20 08

SCSI device sdb: drive cache: = write back=20 w/ FUA

SCSI device sdb: 71132959 = 512-byte hdwr=20 sectors (36420 MB)

sdb: Write Protect is=20 off

sdb: Mode Sense: ab 00 10=20 08

SCSI device sdb: drive cache: = write back=20 w/ FUA

 sdb: sdb1 sdb2=20 sdb3

sd 0:0:1:0: Attached scsi disk = sdb

ACPI: PCI Interrupt = 0000:04:02.1[B] ->=20 GSI 19 (level, low) -> IRQ 19

scsi1 : Adaptec AIC79XX PCI-X = SCSI HBA=20 DRIVER, Rev 3.0

       =20 <Adaptec (Dell OEM) 39320 Ultra320 SCSI = adapter>

       =20 aic7902: Ultra320 Wide Channel B, SCSI Id=3D7, PCI 33 or 66Mhz, 512=20 SCBs

...

 

Reimer
------=_NextPart_000_0089_01C714D1.1620B0B0--