Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unbelievable slow harddrive
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
meyerm
Veteran
Veteran


Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

PostPosted: Fri Feb 13, 2004 2:14 am    Post subject: unbelievable slow harddrive Reply with quote

Hi,

I've got an inspiron 8200 with ICH3 IDE controller and 2 Hitachi harddisks. The "Intel PIIxn chipset support" is compiled in.

The second disk is ok, but the first... well:
Code:

yavin root # hdparm -tT /dev/hdc

/dev/hdc:
 Timing buffer-cache reads:   1444 MB in  2.00 seconds = 721.03 MB/sec
 Timing buffered disk reads:   86 MB in  3.05 seconds =  28.18 MB/sec
yavin root # hdparm /dev/hdc

/dev/hdc:
 multcount    = 16 (on)
 IO_support   =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 65535/16/63, sectors = 78140160, start = 0
yavin root # hdparm -tT /dev/hda

/dev/hda:
 Timing buffer-cache reads:   1412 MB in  2.00 seconds = 705.75 MB/sec
 Timing buffered disk reads:    2 MB in 25.50 seconds =  80.32 kB/sec
yavin root # hdparm /dev/hda

/dev/hda:
 multcount    = 16 (on)
 IO_support   =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 65535/16/63, sectors = 117210240, start = 0



That's unbelievable slow. What is happening here? Not unmasking IRQ, using generic 16-bit I/O etc. make it (as you can guess) even worse. Can anybody help me? Thank you

PS: dmesg tells me
Code:

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH3M: IDE controller at PCI slot 0000:00:1f.1
PCI: Enabling device 0000:00:1f.1 (0005 -> 0007)
ICH3M: chipset revision 2
ICH3M: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xbfa0-0xbfa7, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xbfa8-0xbfaf, BIOS settings: hdc:DMA, hdd:pio
hda: HITACHI_DK23EA-60, ATA DISK drive
hdb: HL-DT-STCD-RW/DVD-ROM GCC-4240N, ATAPI CD/DVD-ROM drive
Using anticipatory io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: HITACHI_DK23EB-40, ATA DISK drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 117210240 sectors (60011 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(100)
 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4
hdc: max request size: 128KiB
hdc: 78140160 sectors (40007 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(100)
 /dev/ide/host0/bus1/target0/lun0: p1


Code:

yavin root # hdparm -i /dev/hda

/dev/hda:

 Model=HITACHI_DK23EA-60, FwRev=00K2A0C1, SerialNo=7Y1648
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117210240
 IORDY=yes, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3:

 * signifies the current active mode

yavin root # hdparm -i /dev/hdb

/dev/hdb:

 Model=HL-DT-STCD-RW/DVD-ROM GCC-4240N, FwRev=D110, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 *udma2
 AdvancedPM=no
 Drive conforms to: device does not report version:

 * signifies the current active mode
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1114
Location: Den Dolder, The Netherlands

PostPosted: Fri Feb 13, 2004 9:19 am    Post subject: Reply with quote

Interesting... I have similar problems with my laptop, also using a Hitachi drive:
Code:
OdysseusGentoo root # hdparm -tT /dev/hda

/dev/hda:
 Timing buffer-cache reads:   1376 MB in  2.00 seconds = 687.07 MB/sec
 Timing buffered disk reads:   72 MB in  3.08 seconds =  23.40 MB/sec
OdysseusGentoo root #
I don't know hdparm well but I did note that on another Gentoo box the ratio between the 2 timings is 10, here it's like 30. Maybe a buffer problem?
Code:
OdysseusGentoo root # hdparm -i /dev/hda

/dev/hda:

 Model=HITACHI_DK23DA-40, FwRev=00J0A0A1, SerialNo=13UHSC
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78140160
 IORDY=yes, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3:

 * signifies the current active mode
Back to top
View user's profile Send private message
meyerm
Veteran
Veteran


Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

PostPosted: Fri Feb 13, 2004 9:56 am    Post subject: Reply with quote

For me, it looks like you're quite lucky with your timings :-)

you got almost 700 MB/s from cache which is ok and 30 MB/s from disk which is also ok for a laptop harddisk. As you can see, my second disk (hdc) does have similar values...

But 80 kB/s is faaaar too slow... :-(
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1114
Location: Den Dolder, The Netherlands

PostPosted: Fri Feb 13, 2004 11:48 am    Post subject: Reply with quote

:? Maybe I wasn't looking right. Anyway, this Gentoo box I'm using now has serial ATA (i.e. SCSI) and I don't know how to time that. The second system I was mentioning had scores of 562/50 although it is a fast UDMA6 disk. Indeed I am noticing very high wait percentages in TOP for this system, so I'm beginning to assume something is wrong.

So it's /dev/hda you're worried about? BTW you didn't include
Code:
hdparm -i /dev/hdc
but /dev/hdb.
Back to top
View user's profile Send private message
meyerm
Veteran
Veteran


Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

PostPosted: Fri Feb 13, 2004 2:33 pm    Post subject: Reply with quote

Whoops. Thanks :-)

Code:

yavin root # hdparm -i /dev/hdc

/dev/hdc:

 Model=HITACHI_DK23EB-40, FwRev=00K0A0C0, SerialNo=6G4590
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78140160
 IORDY=yes, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3:

 * signifies the current active mode


And yes, it's hda. hdc seems to be ok for a notebook harddisk. But hda would not even be acceptable on my Zaurus or P100 ;-)
Back to top
View user's profile Send private message
safferli
n00b
n00b


Joined: 14 Jan 2004
Posts: 45

PostPosted: Fri Feb 13, 2004 3:52 pm    Post subject: Reply with quote

I have the same problem on my Acer Travelmate 800 with a Hitatchi harddirve. Note that the testing gives *terrible* results, but the system doesn't feel slow at all.

Code:
bash-2.05b# hdparm -i /dev/hda

/dev/hda:

 Model=HITACHI_DK23EA-60, FwRev=00K2A0A1, SerialNo=PV9356
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117210240
 IORDY=yes, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3:

 * signifies the current active mode


Code:
bash-2.05b# hdparm /dev/hda

/dev/hda:
 multcount    = 16 (on)
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 65535/16/63, sectors = 117210240, start = 0
bash-2.05b# hdparm -tT /dev/hda

/dev/hda:
 Timing buffer-cache reads:   1288 MB in  2.00 seconds = 642.49 MB/sec
 Timing buffered disk reads:   10 MB in  3.35 seconds =   2.99 MB/sec


which is not too bad, I had values of 30kB/s already... seems to be pretty stable on 2-3MB/s now. I could get the 642MB/s faster with some more aggressive hdparm settings.

But now for the strange part: turn off dma and the test results increase!

Code:

ash-2.05b# hdparm -d0 /dev/hda

/dev/hda:
 setting using_dma to 0 (off)
 using_dma    =  0 (off)
bash-2.05b# hdparm -tT /dev/hda

/dev/hda:
 Timing buffer-cache reads:   1212 MB in  2.01 seconds = 604.28 MB/sec
 Timing buffered disk reads:   22 MB in  3.06 seconds =   7.19 MB/sec


Perhaps you could try to turn off dma and see what happens...
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1114
Location: Den Dolder, The Netherlands

PostPosted: Fri Feb 13, 2004 5:22 pm    Post subject: Reply with quote

safferli wrote:
I have the same problem on my Acer Travelmate 800 with a Hitatchi harddirve. Note that the testing gives *terrible* results, but the system doesn't feel slow at all.

But now for the strange part: turn off dma and the test results increase!

Code:

ash-2.05b# hdparm -d0 /dev/hda

/dev/hda:
 setting using_dma to 0 (off)
 using_dma    =  0 (off)
bash-2.05b# hdparm -tT /dev/hda

/dev/hda:
 Timing buffer-cache reads:   1212 MB in  2.01 seconds = 604.28 MB/sec
 Timing buffered disk reads:   22 MB in  3.06 seconds =   7.19 MB/sec


Perhaps you could try to turn off dma and see what happens...
My disk has slowed down to 2-3 as well... I've been fiddling around with hdparm but no luck. Studying the man page I wonder whether it still is necessary to use hdparm manually, or even what the boot service does.
Back to top
View user's profile Send private message
feffi
Apprentice
Apprentice


Joined: 29 Mar 2003
Posts: 216
Location: Sol->Earth->Germany->Giessen

PostPosted: Fri Feb 13, 2004 5:35 pm    Post subject: Reply with quote

As 'safferli' allready wrote my Harddisk also seems quite slow (as well in Gentoo as in Windows), maybe the limit of the Hitachi drive lays around 8MB/sec?? I also use an Acer Travelmate 803 LCi.

My hdparm settings:
Code:

all_args="-d1 -A1 -m16 -u1 -a64 -c1"


my info on /dev/hda:
Code:

bash ~ # hdparm -i /dev/hda

/dev/hda:

 Model=IC25N040ATCS04-0, FwRev=CA4OA71A, SerialNo=CSH406DDHN872B
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=DualPortCache, BuffSize=1768kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78140160
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3:

 * signifies the current active mode


my benchmarks on /dev/hda (average from 3 runs):
Code:

bash ~ # hdparm -tT /dev/hda

/dev/hda:
 Timing buffer-cache reads:   1468 MB in  2.00 seconds = 733.38 MB/sec
 Timing buffered disk reads:   62 MB in  3.08 seconds =  20.13 MB/sec


Despite that THIS is definetly NOT fast, the system 'feels' fast...strange...

edit: I've done some research on Hitachi drive an found that the tranferrate of approx. 20MB/sec is the fastest where 8-10MB/sec is average (depending on where the data is actually on the drive). Furthermore this drive seems to be one of the faster ones built into laptops...sad, but true...
_________________
have fun

feffi

/(bb|[^b]{2})/ that is the Question!

Gentoo-Wiki: Acer Travelmate 803 LCi manual
Back to top
View user's profile Send private message
meyerm
Veteran
Veteran


Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

PostPosted: Fri Feb 13, 2004 9:04 pm    Post subject: Reply with quote

Hmm, ok. What kernel are you using? As safferli wrote, disabling DMA really helped a little bit! Now I got 4 MB/s which is a world faster than before (Att: only in the hdparm tests! I didn't do any "real" tests up to now)

I'm using a 2.6.1
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum