# disks is slow down in my gentoo?

## wcw

Hi,guys!

I found my disks performance in gentoo is not as good as in Redhat.

The gentoo and redhat are is in the same machine.Here is the output of hdparm:

In gentoo:

```

 gentoo# hdparm -tT /dev/sda /dev/sdb /dev/sdc

/dev/sda:

 Timing cached reads:   1642 MB in  2.00 seconds = 820.32 MB/sec

 Timing buffered disk reads:  184 MB in  3.02 seconds =  61.01 MB/sec

/dev/sdb:

 Timing cached reads:   1582 MB in  2.00 seconds = 790.61 MB/sec

 Timing buffered disk reads:  172 MB in  3.02 seconds =  56.86 MB/sec

/dev/sdc:

 Timing cached reads:   1578 MB in  2.00 seconds = 788.82 MB/sec

 Timing buffered disk reads:  176 MB in  3.01 seconds =  58.50 MB/sec

```

In redhat-el4:

```

redhat# hdparm -tT /dev/sda /dev/sdb /dev/sdc

/dev/sda:

 Timing cached reads:   2984 MB in  2.00 seconds = 1491.48 MB/sec

 Timing buffered disk reads:  186 MB in  3.02 seconds =  61.50 MB/sec

/dev/sdb:

 Timing cached reads:   2988 MB in  2.00 seconds = 1494.23 MB/sec

 Timing buffered disk reads:  172 MB in  3.01 seconds =  57.15 MB/sec

/dev/sdc:

 Timing cached reads:   2992 MB in  2.00 seconds = 1495.48 MB/sec

 Timing buffered disk reads:  174 MB in  3.01 seconds =  57.82 MB/sec

```

You can see that the speed of cache reading in gentoo is almost just a half of the one in redhat.

I don't know how to optimize the SATA disk because the configuration of hdparm seems don't work on it .

Another problem is that my sda is a PATA disk but not SATA disk.So why the system recognize it as /dev/sda but not /dev/hda?

Here is the output of lspci:

```

 # lspci

00:00.0 Host bridge: Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub (rev 02)

00:02.0 VGA compatible controller: Intel Corporation 945G/GZ Express Integrated Graphics Controller (rev 02)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)

00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01)

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)

00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)

00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller IDE (rev 01)

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)

02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5789 Gigabit Ethernet PCI Express (rev 11)

03:06.0 RAID bus controller: <pci_lookup_name: buffer too small> (rev 13)

```

----------

## xalan

What are the hard-drive parameters when Gentoo is running. You can do hdparm /dev/sdX  and compare it when redhat is booted. If the problem persists, post the output of hdparm /dev/sdX , where X is a, b, or c.

----------

## wcw

I don't use any hard-drive parameters.

in menu.lst:

```

#(0)

title Red Hat Enterprise Linux AS (2.6.9-42.0.3.EL_lustre.1.5.97smp)

        root (hd0,0)

        kernel /boot/vmlinuz-2.6.9-42.0.3.EL_lustre.1.5.97smp ro root=LABEL=/ rhgb quiet

        initrd /boot/initrd-2.6.9-42.0.3.EL_lustre.1.5.97smp.img

#(3)

title Gentoo-2.6.20-r7

root    (hd2,0)

kernel  /boot/bzImage-2.6.20-r7 root=/dev/sdc1

```

I heard that hdparm can't be use to config SATA disk.Here is the result of hdparm /dev/sdX.

```

gentoo# hdparm /dev/sda /dev/sdb /dev/sdc

/dev/sda:

 IO_support   =  0 (default 16-bit)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 36483/255/63, sectors = 586114704, start = 0

/dev/sdb:

 IO_support   =256 (???)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 36481/255/63, sectors = 586072368, start = 0

/dev/sdc:

 IO_support   =256 (???)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 36481/255/63, sectors = 586072368, start = 0

redhat# hdparm /dev/sda /dev/sdb /dev/sdc

/dev/sda:

 HDIO_GET_MULTCOUNT failed: Inappropriate ioctl for device

 IO_support   =  0 (default 16-bit)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 36483/255/63, sectors = 300090728448, start = 0

/dev/sdb:

 HDIO_GET_MULTCOUNT failed: Inappropriate ioctl for device

 IO_support   =256 (???)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 36481/255/63, sectors = 300069052416, start = 0

/dev/sdc:

 HDIO_GET_MULTCOUNT failed: Inappropriate ioctl for device

 IO_support   =256 (???)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 36481/255/63, sectors = 300069052416, start = 0

```

I don't know exactly why redhat gave out the error message but gentoo didn't.Maybe that is because of the different versions of hdparm: in redhat is 5.7 and in gentoo the version is 6.9.

----------

## guero61

The first number from hdparm is not disk-dependent:

https://forums.gentoo.org/viewtopic-t-554935-highlight-.html#4023026

----------

## eccerr0r

http://freshmeat.net/projects/hdparm/?branch_id=4062&release_id=245306

Check out at the "Changelog" section.

Throw away Red Hat results.  Ignore absolute numerical value of Gentoo.

Done.

----------

