Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] Slow HD

1 view
Skip to first unread message

José Pable Ezequiel Fernández

unread,
Aug 17, 2005, 5:40:07 PM8/17/05
to
Hello,
I am not sure, but I think I am experiencing dramatic slow down on my computer
when doing HD intensive (but not CPU intensive) tasks such as coping files
(or rsyncing).
Is it possible that I have disabled dma, or missing a kernel module for my IDE
controler or something like that ?
Any documentation/guide with this kind of things ?
Thanks.
--
José Pable Ezequiel Fernández

--
gento...@gentoo.org mailing list

Mark Knecht

unread,
Aug 17, 2005, 5:50:08 PM8/17/05
to
A quick test would be

hdparm -tT /dev/hda

(or whatever drive you are concerned about.) Greater than 15MB/S is
almost certainly DMA but good DMA from newer drives should be
25-50MB/S

You can look at the drives parameters using hdparm and reading through
the man page to understand what all the values mean.

Hope this helps,
Mark

On 8/17/05, José Pable Ezequiel Fernández

--
gento...@gentoo.org mailing list

Pupeno

unread,
Aug 17, 2005, 9:00:16 PM8/17/05
to
On Wednesday 17 August 2005 18:44, Mark Knecht wrote:
> A quick test would be
>
> hdparm -tT /dev/hda
I got this:
/dev/hda:
Timing cached reads: 1344 MB in 2.00 seconds = 672.10 MB/sec
Timing buffered disk reads: 8 MB in 3.51 seconds = 2.28 MB/sec

> (or whatever drive you are concerned about.) Greater than 15MB/S is
> almost certainly DMA but good DMA from newer drives should be
> 25-50MB/S

The second speed is evidently wrong.

> You can look at the drives parameters using hdparm and reading through
> the man page to understand what all the values mean.

I tried to enable dma, but this happened:
# hdparm -d1 /dev/hda

/dev/hda:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)

What am I doing wrong ? some kernel option ?

Thanks
--
Pupeno <pup...@pupeno.com> (http://pupeno.com)
Reading ? Science Fiction ? http://sfreaders.com.ar

Mark Knecht

unread,
Aug 17, 2005, 9:20:06 PM8/17/05
to
On 8/17/05, Pupeno <pup...@pupeno.com> wrote:
> On Wednesday 17 August 2005 18:44, Mark Knecht wrote:
> > A quick test would be
> >
> > hdparm -tT /dev/hda
> I got this:
> /dev/hda:
> Timing cached reads: 1344 MB in 2.00 seconds = 672.10 MB/sec
> Timing buffered disk reads: 8 MB in 3.51 seconds = 2.28 MB/sec
>
> > (or whatever drive you are concerned about.) Greater than 15MB/S is
> > almost certainly DMA but good DMA from newer drives should be
> > 25-50MB/S
> The second speed is evidently wrong.

Not wrong, just not DMA. BTW - as has been pointed out here before -
do not take these numbers as a serious test of real disk speeds. This
is a just a quick way of looking.

>
> > You can look at the drives parameters using hdparm and reading through
> > the man page to understand what all the values mean.
> I tried to enable dma, but this happened:
> # hdparm -d1 /dev/hda
>
> /dev/hda:
> setting using_dma to 1 (on)
> HDIO_SET_DMA failed: Operation not permitted
> using_dma = 0 (off)
>
> What am I doing wrong ? some kernel option ?

Possibly. Many of the ATAPI DMA drivers are supplied when you enable
the proper chipset support in make menuconfig under Device Drivers ->
ATA support.

What chipset is your machine using? (lspci)

From my laptop:

flash linux # 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 = 80026361856, start = 0
flash linux #

flash linux # hdparm -tT /dev/hda

/dev/hda:
Timing cached reads: 1788 MB in 2.00 seconds = 891.91 MB/sec
Timing buffered disk reads: 82 MB in 3.04 seconds = 26.93 MB/sec
flash linux #

Cheers,
Mark

--
gento...@gentoo.org mailing list

Joe Menola

unread,
Aug 17, 2005, 9:20:08 PM8/17/05
to
On Wednesday August 17 2005 7:56 pm, Pupeno wrote:
> On Wednesday 17 August 2005 18:44, Mark Knecht wrote:
> > A quick test would be
> >
> > hdparm
>
> I got this:
> /dev/hda:
> Timing cached reads: 1344 MB in 2.00 seconds = 672.10 MB/sec
> Timing buffered disk reads: 8 MB in 3.51 seconds = 2.28 MB/sec
>
> > (or whatever drive you are concerned about.) Greater than 15MB/S is
> > almost certainly DMA but good DMA from newer drives should be
> > 25-50MB/S
>
> The second speed is evidently wrong.
>
> > You can look at the drives parameters using hdparm and reading through
> > the man page to understand what all the values mean.
>
> I tried to enable dma, but this happened:
> # hdparm -d1 /dev/hda
>
> /dev/hda:
> setting using_dma to 1 (on)
> HDIO_SET_DMA failed: Operation not permitted
> using_dma = 0 (off)
>
> What am I doing wrong ? some kernel option ?
>
> Thanks

If you want the kernel to set dma you need to enable it and the support for
your motherboard chipset. For a 2.6.12 kernel, you'll find this under
Block devices
ATA/ATAPI/MFM/RLL support
Enable
Generic PCI bus-master DMA support (BLK_DEV_IDEDMA_PCI)
Use PCI DMA by default when available (IDEDMA_PCI_AUTO)
And below that support for your MB chipset.

However, hdparm should have set this even without kernel support (I'm pretty
sure)...what say #hdparm /dev/hda

-jm
--
gento...@gentoo.org mailing list

Volker Armin Hemmann

unread,
Aug 17, 2005, 10:10:06 PM8/17/05
to

you may want to turn on 32 bit io and unmaskirq too. Which are both
beneficial.
--
gento...@gentoo.org mailing list

Pupeno

unread,
Aug 17, 2005, 10:10:07 PM8/17/05
to
I have both.

> And below that support for your MB chipset.

I have all as modules, maybe I am just missing to load it.

> However, hdparm should have set this even without kernel support (I'm
> pretty sure)...what say #hdparm /dev/hda

/dev/hda:
multcount = 16 (on)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)

using_dma = 0 (off)


keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)

geometry = 65535/16/63, sectors = 40007761920, start = 0

Thanks.

Pupeno

unread,
Aug 17, 2005, 10:10:07 PM8/17/05
to
On Wednesday 17 August 2005 22:15, Mark Knecht wrote:
> On 8/17/05, Pupeno <pup...@pupeno.com> wrote:
> > On Wednesday 17 August 2005 18:44, Mark Knecht wrote:
> > > A quick test would be
> > >
> > > hdparm -tT /dev/hda
> >
> > I got this:
> > /dev/hda:
> > Timing cached reads: 1344 MB in 2.00 seconds = 672.10 MB/sec
> > Timing buffered disk reads: 8 MB in 3.51 seconds = 2.28 MB/sec
> >
> > > (or whatever drive you are concerned about.) Greater than 15MB/S is
> > > almost certainly DMA but good DMA from newer drives should be
> > > 25-50MB/S
> >
> > The second speed is evidently wrong.
>
> Not wrong, just not DMA.
Should I leave DMA off ? Isn't almost always faster to use DMA ?

> > > You can look at the drives parameters using hdparm and reading through
> > > the man page to understand what all the values mean.
> >
> > I tried to enable dma, but this happened:
> > # hdparm -d1 /dev/hda
> >
> > /dev/hda:
> > setting using_dma to 1 (on)
> > HDIO_SET_DMA failed: Operation not permitted
> > using_dma = 0 (off)
> >
> > What am I doing wrong ? some kernel option ?
>
> Possibly. Many of the ATAPI DMA drivers are supplied when you enable
> the proper chipset support in make menuconfig under Device Drivers ->
> ATA support.

I have all of them enabled as modules.

> What chipset is your machine using? (lspci)

0000:00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller
(rev 01)

> From my laptop:
>
> flash linux # hdparm /dev/hda
>
> /dev/hda:
> multcount = 16 (on)
> IO_support = 0 (default 16-bit)
> unmaskirq = 0 (off)
> using_dma = 1 (on)

Here, your dma is on! :)

> keepsettings = 0 (off)
> readonly = 0 (off)
> readahead = 256 (on)
> geometry = 65535/16/63, sectors = 80026361856, start = 0
> flash linux #
>
> flash linux # hdparm -tT /dev/hda
>
> /dev/hda:
> Timing cached reads: 1788 MB in 2.00 seconds = 891.91 MB/sec
> Timing buffered disk reads: 82 MB in 3.04 seconds = 26.93 MB/sec
> flash linux #

Thanks.

Mark Knecht

unread,
Aug 17, 2005, 10:40:06 PM8/17/05
to

I'm sorry if this copy/paste gets messy. I'm attempting to show you
all the stuff I have enabled on a Via desktop machine:

<*> ATA/ATAPI/MFM/RLL support │ │
│ │ <*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
│ │
│ │ --- Please see Documentation/ide.txt for help/info on IDE
drives │ │
│ │ [ ] Support for SATA (deprecated; conflicts with libata
SATA driver) │ │
│ │ [ ] Use old disk-only driver on primary interface
│ │
│ │ <*> Include IDE/ATA-2 DISK support
│ │
│ │ [*] Use multi-mode by default
│ │
│ │ <*> Include IDE/ATAPI CDROM support
│ │
│ │ < > Include IDE/ATAPI TAPE support (EXPERIMENTAL)
│ │
│ │ < > Include IDE/ATAPI FLOPPY support
│ │
│ │ < > SCSI emulation support
│ │
│ │ [ ] IDE Taskfile Access
│ │
│ │ --- IDE chipset support/bugfixes
│ │
│ │ <*> generic/default IDE chipset support
│ │
│ │ [*] CMD640 chipset bugfix/support
│ │
│ │ [ ] CMD640 enhanced support
│ │
│ │ [ ] PNP EIDE support
│ │
│ │ [*] PCI IDE chipset support
│ │
│ │ [*] Sharing PCI IDE interrupts support
│ │
│ │ [ ] Boot off-board chipsets first support
│ │
│ │ <*> Generic PCI IDE Chipset Support
│ │
│ │ < > OPTi 82C621 chipset enhanced support (EXPERIMENTAL)
│ │
│ │ <*> RZ1000 chipset bugfix/support
│ │
│ │ [*] Generic PCI bus-master DMA support
│ │
│ │ [ ] Force enable legacy 2.0.X HOSTS to use DMA
│ │
│ │ [*] Use PCI DMA by default when available
[ ] Enable DMA only for disks
│ │
│ │ < > AEC62XX chipset support
│ │
│ │ < > ALI M15x3 chipset support
│ │
│ │ < > AMD and nVidia IDE support
│ │
│ │ < > ATI IXP chipset IDE support
│ │
│ │ < > CMD64{3|6|8|9} chipset support
│ │
│ │ < > Compaq Triflex IDE support
│ │
│ │ < > CY82C693 chipset support
│ │
│ │ < > Cyrix CS5510/20 MediaGX chipset support (VERY
EXPERIMENTAL) │ │
│ │ < > Cyrix/National Semiconductor CS5530 MediaGX chipset
support │ │
│ │ < > HPT34X chipset support
│ │
│ │ < > HPT36X/37X chipset support
│ │
│ │ < > National SCx200 chipset support
│ │
│ │ < > Intel PIIXn chipsets support
│ │
│ │ < > IT821X IDE support
│ │
│ │ < > NS87415 chipset support
│ │
│ │ < > PROMISE PDC202{46|62|65|67} support
│ │
│ │ < > PROMISE PDC202{68|69|70|71|75|76|77} support
│ │
│ │ < > ServerWorks OSB4/CSB5/CSB6 chipsets support
│ │
│ │ < > Silicon Image chipset support
│ │
│ │ < > SiS5513 chipset support
│ │
│ │ < > SLC90E66 chipset support
│ │
│ │ < > Tekram TRM290 chipset support
│ │
│ │ <*> VIA82CXXX chipset support
│ │
│ │ [ ] Other IDE chipset support
│ │
│ │ [ ] IGNORE word93 Validation BITS

I think the important ones are probably:

<*> ATA/ATAPI/MFM/RLL support │ │
│ │ <*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
│ │

│ │ [*] Use multi-mode by default
│ │

│ │ <*> generic/default IDE chipset support
│ │

│ │ [*] PCI IDE chipset support
│ │

│ │ [*] Sharing PCI IDE interrupts support
│ │

│ │ <*> Generic PCI IDE Chipset Support
│ │

│ │ [*] Use PCI DMA by default when available


and for you probably:

│ │ < > Intel PIIXn chipsets support
│ │

Hope this helps,

Joe Menola

unread,
Aug 17, 2005, 10:50:14 PM8/17/05
to
On Wednesday August 17 2005 9:02 pm, Pupeno wrote:
> I have all as modules, maybe I am just missing to load it.

Personally, I would compile them into kernel.

You can get the module names from menuconfig/xconfig by selecting them and
choosing help.
Modprobe them, then hdparm /dev/hda. If dma is now on, add them
to /etc/modules.autoload.d/kernel-2.6.

Pupeno

unread,
Aug 17, 2005, 11:00:27 PM8/17/05
to
On Wednesday 17 August 2005 23:30, Mark Knecht wrote:
> I think the important ones are probably:
>
> <*> ATA/ATAPI/MFM/RLL support
> │ │ │ │ <*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
> │ │
>
> │ │ [*] Use multi-mode by default
> │ │
>
> │ │ <*> generic/default IDE chipset support
> │ │
>
> │ │ [*] PCI IDE chipset support
> │ │
>
> │ │ [*] Sharing PCI IDE interrupts support
> │ │
>
> │ │ <*> Generic PCI IDE Chipset Support
> │ │
>
> │ │ [*] Use PCI DMA by default when available
I have all of them on my kernel already.

> and for you probably:
>
> │ │ < > Intel PIIXn chipsets support
> │ │

I have this as module and it seem to be loaded automatically because lsmod
shows:
piix 9476 0 [permanent]

Maybe it has to be compiled on the kernel (not as a module) to work ?

Pupeno

unread,
Aug 17, 2005, 11:20:05 PM8/17/05
to
On Wednesday 17 August 2005 23:04, Volker Armin Hemmann wrote:
> > flash linux #  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 = 80026361856, start = 0
> > flash linux #
>
> you may want to turn on 32 bit io and unmaskirq too.
How do you do that ?

> Which are both
> beneficial.
Can they be bad in some case ?

Pupeno

unread,
Aug 17, 2005, 11:20:09 PM8/17/05
to
On Wednesday 17 August 2005 23:52, Pupeno wrote:
> I have this as module and it seem to be loaded automatically because lsmod
> shows:
> piix 9476 0 [permanent]
>
> Maybe it has to be compiled on the kernel (not as a module) to work ?
I compiled it in the kernel and now DMA is on by default.

# 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 = 40007761920, start = 0


and the tests are better:
/dev/hda:
Timing cached reads: 1332 MB in 2.01 seconds = 664.11 MB/sec
Timing buffered disk reads: 76 MB in 3.01 seconds = 25.25 MB/sec

well, at least the buffered one. Can it be tuned more ?

Thanks

Mark Knecht

unread,
Aug 18, 2005, 12:00:14 AM8/18/05
to
On 8/17/05, Pupeno <pup...@pupeno.com> wrote:

Hey, much better results. Cool. The results look pretty reasonable.
You can play around with the read ahead a bit if you want. Try it with
unmaskirq both ways, etc.

Do a reboot also and make sure your settings stick. They probably will
but it's good to do a check while you're looking at this vs. tomorrow
when you're not.

Cheers,

Volker Armin Hemmann

unread,
Aug 18, 2005, 6:30:22 AM8/18/05
to
On Thursday 18 August 2005 05:13, Pupeno wrote:
> On Wednesday 17 August 2005 23:04, Volker Armin Hemmann wrote:
> > > flash linux #  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 = 80026361856, start = 0
> > > flash linux #
> >
> > you may want to turn on 32 bit io and unmaskirq too.
>
> How do you do that ?

man hdparm ;)
-c1 turns on 32 bit io, -u1 turns on unmaskirq.

>
> > Which are both
> > beneficial.
>
> Can they be bad in some case ?
>

never heard of one ;)

--
gento...@gentoo.org mailing list

0 new messages