# my harddrive performance is sucking

## Guest

here's the situation... I'm reading the following article from OreillyNet:

http://linux.oreillynet.com/pub/a/linux/2000/06/29/hdparm.html

in doing so, I ran the infamous command "hdparm -Tt /dev/hda" and found that:

Timing buffer-cache reads: 128 MB in 6.69 seconds = 19.13 MB/sec

Timing buffered disk reads: 64 MB in 36.16 seconds = 1.77 MB/sec

this seems extremely slow.  of course, I was also in KDE and doing an "emerge evolution" command at the same time... will this affect the results?  (I will do it again in console mode with no other running commands)

-S

----------

## Guest

try

hdparm -c 1 -d 1 /dev/hda

(as root of course)

and do the hdparm -tT /dev/hda check again

my results:

/dev/hdb:

 Timing buffer-cache reads:   128 MB in  0.42 seconds =304.76 MB/sec

 Timing buffered disk reads:  64 MB in  2.76 seconds = 23.19 MB/sec

----------

## +BroNNoS+

Is there a way to get this automatically done every time you boot?

----------

## tanksimpson

Yeah, you need to add a line to /etc/conf.d/local.start such as:

hdparm -qc 1 -qd 1 -qk 1 /dev/hda

the "q"  before each option tells hdparm not to spit out a bunch of messages you probably dont wanna see every time you boot up. local.start seems to be gentoo's equivalent of rc.local - a good place to tack on some tweaks at start-up.

----------

## Guest

Depending on what options the kernel/ide driver already have set, there are also the "-m XY" and "-u 1" options for hdparm.

If you do a hdparm /dev/hda and the line "multcount = XY" shows XY as > 0 then the "-m" option will have no effect.

If the result from "hdparm /dev/hda" shows this:

...

multcount = 0 (off)

...

Then try with the command "hdparm -m 16 /dev/hda". This will enable multiple sector I/O (block mode). Rerun your benchmark and compare your results.

"-u 1" will not improve your benchmarks but it will improve the overall responsiveness of the system since it unmasks other IRQs while processing the (IDE) command(s).

NOTE !!!

The "-u" and "-m" options *can* cause file system corruption so if you have an older system you should be a bit careful with these options. Kernels >= 2.4 usually fix this for these system if you enabled the "CMD-640" and "RZ1000" bug fixes when you compiled your kernel. Anyway, you should do these tweaks at the beginning of your installation, before you have compiled and configured everything (fast reinstall if things fail ...).

I usually have this at the end of my /etc/conf.d/local.start file:

/sbin/hdparm -qm 16 -qc 1 -qu 1 -qd 1 /dev/hda

16 sectors block mode, 32-bit I/O supprt, unmask IRQs, use DMA. "q" prefix for quiet mode.

----------

## Ozymandias

does anybody know then how I get my disks to talk ata100 ? now I get this in dmesg:

```
 

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci00:07.1

    ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:DMA, hdd:pio

hda: Maxtor 2B020H1, ATA DISK drive

hdc: 24X10, ATAPI CD/DVD-ROM drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

hda: 40020624 sectors (20491 MB) w/2048KiB Cache, CHS=2491/255/63, UDMA(33)

hdc: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, DMA
```

but that says UDMA(33) how do I get this to be UDMA(100) ? or is ata100 not related to UDMA? should I use the idebus=100 ? but I assume my PCI isn't 100MHz, just my ata....

```

via src # hdparm -tT /dev/hda

/dev/hda:

 Timing buffer-cache reads:   128 MB in  2.66 seconds = 48.12 MB/sec

 Timing buffered disk reads:  64 MB in  2.43 seconds = 26.34 MB/sec

Hmm.. suspicious results: probably not enough free memory for a proper test.

```

is what I get now, is this about correct for a 5400 RPM 20 gig disk?

greetz Ozy

----------

## Guest

Do a "hdparm -i /dev/hda" and check what DMA mode your drive is using. Look at the end of the output, you'll see something like this:

"mdam0 mdma1 mdma2 ..." and "udma0 udma1 ..."

The current mode is indicated by a trailing "*" as in "mdma2*".

The various modes are:

mdma0 - 4.2 MB/s

mdma1 - 13.3 MB/s

mdma2 - 16.6 MB/s

udma0 - 16.6 MB/s

udma1 - 25 MB/s

udma2 - 33.3 MB/s

udma3 - 44.4 MB/s

udma4 - 66.6 MB/s

udma5 - 100 MB/s

udma6 - 133.3 MB/s

Remember that those are burst speeds, you'll never even come close to those numbers unless you're doing burst speed benchmarks (something hdparm doesn't).

If DMA is enabled for that particular disk hdparm should show that udma4 or udma5 is selected. ~25 MB/s in buffered reads looks pretty OK for a 5200 rpm disk, I'm getting ~35 MB/s with an  Athlon 1333 + 7200 rpm disk (running in udma4 mode).

----------

## Guest

Thanks for these great tips! My DMA mode was also disabled though my new hd even supports UDMA100! Now my performance greatly improved!

This is definitively something for the installation docs or FAQ of forthcoming Gentoo versions!

BTW: Gentoo rules!  :Wink: 

----------

## Ozymandias

oke thank you!

one last thing, mine is in udma2 modes, I don't get higher modes listed, but I assume that udma2 is ata33 ? and udma4 is ata100 ? if I do a hdparm -d1 -X100 is that wise? the manual says this is dangerous.. but I know my drive can do ata100 (hdparm even says that) and my motherboard can do too, so .. is -X100 wise?

thnx greetz Ozy

----------

## Guest

Well ... There is some confusion regarding the ATA-X, UltraATA-XX and UDMA modes ... That is because we're mixing ATA specifications, protocols and DMA modes. The manufacturers didn't wait for a "real" specification so they invented their own versions instead ...

But if we did try to summarize the various modes, we have:

```

ATA     Protocol       DMA Mode      Burst Speed

----------------------------------------------

ATA     IDE            PIO-0         3.3 - 8.3 MB/s

                       PIO-1

                       PIO-2

                       MDMA-0

ATA-2   Fast ATA       PIO-3         11.1 - 13.3 MB/s

        (EIDE)         MDMA-1

ATA-3   Fast ATA       PIO-4         16.6 MB/s

        (EIDE)         MDMA-2

                       UDMA-0

ATA-4   UltraATA-33    UDMA-2        33.3 MB/s

ATA-5   UltraATA-66    UDMA-4        66.6 MB/s

ATA-6   UltraATA-100   UDMA-5        100 MB/s

ATA-7   UltraATA-133   UDMA-6        133 MB/s

```

The manufacturers mixed bits from here and there (to impress the consumers - i.e. you and me) so we also have names like UDMA-66 and stuff like that. But if you look at the table above I think you can see what modes there are and their burst speed specification.

Ozy: udma4 is UltraATA-66. udma5 is UltraATA-100.

If you do a hdparm -I /dev/hda (uppercase 'I') you will get a more precise description of what your disk can handle. Compare that to the table above.

And yes, the -X option can be somewhat dangerous - don't do that on a system you've been working on for several days to install and configure  :Smile: 

----------

## Ozymandias

thank you for beeing this helpful  :Smile: 

so my hd is in udma2 but can do udma5 (ata 100 .. the one I want) how do I get in udma5? hdparm -X100 /dev/hda ? or must I change something in my bios? and what if I mount my disks read only just to try it out? should that be saver ?? and what if I put my bios in read only and then try it could that garantee 0% data loss ? Or should I give my kernel the ide=100 (or whatever it was) to get to udma5? any idea's?? 

greetz Ozy

----------

## Guest

The hdparm option -X works as follows ...

For PIO modes it's the desired mode plus 8. For PIO mode 2 that would be "-X 10", PIO mode 3 is "-X 11" etc.

For Multiword DMA (mdma) it's the desired mode plus 32. For mdma mode 1 that would be "-X 33", mdma mode 2 is "-X 34" etc.

For UltraDMA (udma) it's the desired mode plus 64. For udma mode 2 that would be "-X 66", udma mode 4 is "-X 68".

The udma modes and their "-X" option is:

udma2 : "-X 66"

udma4 : "-X 68"

udma5 : "-X 69"

udma6 : "-X 70"

It's the pio, mdma and udma mode you add, not the speed specification - look at the table, column "DMA Mode" and you'll see what you should add to the base values 8, 32 and 64 (pio, mdma, udma).

(To reset the disk to it's default mode, use "-X 00")

And yes, mounting the disk read only during the test *should* protect you somewhat - I can't guarantee it, but it's at least better than nothing  :Smile: 

I have never managed to get file system corruption while trying various options - even though the disk/system have crashed (many, many times). But I can't say it wont happen ...

Always issue the command "sync" before trying so that disk caches are written to disk and file operations flushed.

----------

## Guest

I forgot, you should of course use the "-X" option together with the "-d 1" option for the udma modes ... Unless it's already operating in DMA mode. To set it to udma5 (UltraATA-100) mode I would ...

hdparm -d 1 -X 69 /dev/hda

Remeber to use the other options too for maximum performance (-c 1 -u 1 -m 16) - read my previous reply about that - include the "NOTE".

----------

## Guest

Ugh, getting a bit tired  :Smile:  There is a typo in the text above ...

The sentence:

"... For udma mode 2 that would be "-X 64", udma mode 4 is "-X 68"."

Is incorrect, it should read:

"... For udma mode 2 that would be "-X 66", udma mode 4 is "-X 68"."

Of course ... The list is alright though.

----------

## fghellar

Edited and fixed.  :Smile: 

(Sorry for editing your post, but you posted it as a Guest, and I had no means to contact you first. And I think it's safer this way, just in case people don't read your update.)

----------

## Buchu

Pepoles who have an via chipset can enable in the kernel configuration HTP366 in ATA/IDE/... for user had  and i don't need hdparm optimizations ( it doesn't change nothing for me)

sleepiiiiiiiiiiiiiiiiiiiiiiiiiiiiiing zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

----------

## Malakin

For anyone wondering if there's a difference between -X68 and -X69, I'm getting 40.25M/sec -t either way so it's not making any difference for me. As long as you're using -X68 I wouldn't bother trying to set it to a higher speed, unless maybe you're doing raid striping or something that would increase the throughput beyond that of a single drive.

This is on a kt333 and a maxtor 60G 7200, had to edit the kernel source so the south bridge was identified as a 8233 instead of the 8233a that it is since the 8233a is considered unknown in 2.4.19 kernel that emerge is giving me although I see now that according to the patch log on kernel.org it's apparently supported as of 2.4.19-pre5.

----------

## wombat

This command: hdparm -c 1 -d 1 -k 1 /dev/hdc

Gives me this response:

/dev/hdc:

 setting 32-bit I/O support flag to 1

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 setting keep_settings to 1 (on)

 I/O support  =  1 (32-bit)

 using_dma    =  0 (off)

 keepsettings =  1 (on)

How can I get my DMA on ? Is it a missing kernel option ? I am only getting 2.1MB/S from my new Deskstar !   :Crying or Very sad: 

----------

## pr0vidence

 *wombat wrote:*   

> This command: hdparm -c 1 -d 1 -k 1 /dev/hdc
> 
> Gives me this response:
> 
> /dev/hdc:
> ...

 

I don't know if it has anything to do with it, but I don't tihnk you are supposed to have spaces between the "d" and the "1" so you like should look more like this:

hdparm -c1 -d1 -k1 /dev/hdc

NOT

hdparm -c 1 -d 1 -k 1 /dev/hdc

Try that.

----------

## Guest

The space between the option and it's value doesn't matter, hdparm recognize both formats, even the hdparm author writes it sometimes as "-d 1" and at other times as "-d1". The man page synopsis shows it with spaces.

First: You wrote "/dev/hdc" is the disk *really* at that device id? You're not trying to enable dma on your cdrom, are you?

There are a couple of things that possibly prevents you from enabling DMA on your Deskstar disk.

- The kernel/hdparm has your specific disk on the "black list". A list of disks with known or reported problems.

- Your disk doesn't support DMA ... At least was not detected as a DMA capable drive. Try "hdparm -I /dev/hdc" and you'll get a list of the modes hdparm thinks your drive can handle.

- Chipset problem. Since you wrote "/dev/hdc", perhaps it's located on a HPT or Promise controller?

BTW, regarding -X 68 and -X 69, I don't exactly remember when the kernel and drivers started to support UltraATA-100 (udma5). If it's not supported by this kernel/driver version you will probably not gain anything even if you enable udma5 mode. That is perhaps what's happening, same thing as in Windows  :Smile: 

----------

## pr0vidence

Sorry, my mistake.

----------

## Anti

Yay! Good I saw this thread!

Got my HD up from doing 4.5MB/sec to do 35.5MB/sec  :Smile: 

So, thanks for the info.

Great forum, btw  :Smile: 

----------

## Guest

 :Surprised:   :Surprised:   :Surprised:  Thanks to this thread I've found the source of a problem I've been trying to fix for some time now!  I have a 100mbps switched network that was only giving me 33% usage when copying files form my windows machine to a fileserver running linux with 3 drives stripped.  For a while I thought it might be the network cabling since they're all old and have been kinked...I checked out this thread and did some tests on my drives.  Before tweaks, two of my three were showing reads of 100MB/s and writes between 10 and 11 MB/s.  The second drive was down low in 3MB/s which tells me it was the limiting factor!  I tweaked it up and it was getting 10-11MB/s also.  After doing that, my network shows throughput of around 60Mbps steady and operations between 50 and 75 mbps!!  WOOHOO

----------

## Jeevz

How are you guys breaking the 30 MB/sec mark? I have all those settings. Asus P4t motherboard with a P4 1.5, ATA100 7200 hard drive. I only get 28.96 MB/sec almost all the time.

----------

## squanto

"How are you guys breaking the 30 MB/sec mark?"

I only get 28.07 MB/sec from my Maxtor ultra 100 5400 drive on via chipset, but I think that is pretty good for a 5400 drive, I am not sure why you wouldn't get over 30megs/sec.

-Andrew

----------

## Guest

whoa nice fix....i ran hdparm and got a whopin 1.80mb/s then i added the fix to the start up script and now its at 38.7mb/s....muuuuuuuch betta

----------

## AutoBot

Man you guys know your stuff I got much better performance, not sure how good this is but here is my new numbers:

/dev/hda:

 Timing buffer-cache reads:   128 MB in  2.11 seconds = 60.66 MB/sec

 Timing buffered disk reads:  64 MB in  3.95 seconds = 16.20 MB/sec

And this is on an old 10gig 5400rpm  :Smile: 

PS>Is there a way to enable any of this stuff on my Buslink 7200rpm USB 2.0 drive as it is SCSI emulated?

----------

## Saravak

I got clean 33,86 MB/sec !

But I included support for my chip set (via kt266)in kernel when i installed my system!

----------

## DArtagnan

How do u know to get the speed?

I want to check too

----------

## Malakin

 *Quote:*   

> How do u know to get the speed?

 

Cached and uncached speeds:

```

hdparm -T /dev/hda

hdparm -t /dev/hda

```

Fore more info:

```

man hdparm

```

----------

## lx

You can also set it using the kernel option

 *Quote:*   

> 
> 
> make menuconfig
> 
> ATA,IDE...->IDE,ATA->Use PCI DMA by default when available
> ...

 

the help talks about some problems with certain boards, but well it works for me.

Cya lX

breaking 30Mb/s, well I have the quantum fireball 30Gb/AS which beats the 30Mb limit, but remember harddisk heads go from outer to inner ring, and on innerring there's less room so at the end of the harddisk I fall under the 30Mb/s think it's about 35 -> 28 Mb/s.

----------

## Xamot

This whole Thread should be moved to Tips & Tricks or thoroughly summarized there. I'm MUCH happier with my system performance after reading thru this thread. 

Thanks,

Xamot

----------

## Zu`

Thanks for performance tweaks, this is really cool:

```

mountaindew root # hdparm -Tt /dev/hda

/dev/hda:

 Timing buffer-cache reads:   128 MB in  1.41 seconds = 90.66 MB/sec

 Timing buffered disk reads:  64 MB in  2.61 seconds = 24.54 MB/sec

mountaindew root # hdparm -c 1 -d 1 /dev/hda

/dev/hda:

 setting 32-bit I/O support flag to 1

 setting using_dma to 1 (on)

 I/O support  =  1 (32-bit)

 using_dma    =  1 (on)

mountaindew root # hdparm -Tt /dev/hda

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.95 seconds =134.98 MB/sec

 Timing buffered disk reads:  64 MB in  2.65 seconds = 24.16 MB/sec

mountaindew root # hdparm -m 16 /dev/hda                      

/dev/hda:

 setti multcount    = 16 (on)

mountaindew root # hdparm -Tt /dev/hda

/dev/hda:

 Timing buffer-cache reads:   128 MB in  1.47 seconds = 87.28 MB/sec

 Timing buffered disk reads:  64 MB in  2.66 seconds = 24.02 MB/sec

mountaindew root # hdparm -m 16 -c 1 -u 1 -d 1 /dev/hda

/dev/hda:

 setting 32-bit I/O support flag to 1

 setting multcount to 16

 setting unmaskirq to 1 (on)

 setting using_dma to 1 (on)

 multcount    = 16 (on)

 I/O support  =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

mountaindew root # hdparm -Tt /dev/hda

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.92 seconds = 138.78 MB/sec

 Timing buffered disk reads:  64 MB in  2.70 seconds = 23.73 MB/sec

```

Timing buffer-cache reads has gone up dramatically!  :Smile: 

But Timing buffered disk reads, seems to go down a bit? How come and what is this value actually?

Thanks all

----------

## kode54

You can also enable automatic DMA on startup for specific devices, adding commands to your kernel append line.

by IDE channel, for both master and slave, ide#=dma

by drive, hdx=dma

All will automatically try for the best possible mode for the drive/controller. In case this causes any problems, I would advise you copy your current settings to a separate backup menu entry, and add the extra settings to the first. Better than digging out your rescue disk.  :Smile: 

----------

## jay

Excellent tips folks!

```

/dev/hdb:

 Timing buffer-cache reads:   128 MB in  0.39 seconds =327.87 MB/sec

 Timing buffered disk reads:  64 MB in  8.50 seconds =  7.53 MB/sec

bash-2.05a# hdparm -m 16 -c 1 -u 1 -d 1  /dev/hdb

/dev/hdb:

 setting 32-bit I/O support flag to 1

 setting multcount to 16

 setting unmaskirq to 1 (on)

 setting using_dma to 1 (on)

 multcount    = 16 (on)

 I/O support  =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

bash-2.05a# hdparm -Tt /dev/hdb

/dev/hdb:

 Timing buffer-cache reads:   128 MB in  0.39 seconds =332.02 MB/sec

 Timing buffered disk reads:  64 MB in  4.32 seconds = 14.81 MB/sec

```

----------

## c_kuzmanic

This is for those of you with a kt266/82XX chipset:

Contrary to what you might think this chipset was not fully supported until recently, when code  submitted by Vojtech Pavlik was incorporated into the 2.4.19-pre9.patch . None of the kernels that you can emerge through portage have that patch, so if you want full support for that chipset you have to build your own patched kernel. Keep in mind that this patch is a work in progress.

So what you need to do is emerge vanilla sources, then head over to ftp.kernel.org get 2.4.19-pre9.patch and apply that patch to the vanilla sources.  

Optionally you can also get the pre-emptive kernel patch and apply that AFTER you applied the patch mentioned above.

I did this and my system (Soyo Dragon +, kt266a/VT8233CE) runs smoother than ever:)

----------

## niyogi

so what was the reason one would get the following error:

HDIO_SET_DMA failed: Operation not permitted

-S

----------

## arkane

 *niyogi wrote:*   

> so what was the reason one would get the following error:
> 
> HDIO_SET_DMA failed: Operation not permitted
> 
> -S

 

Are you as root?

 :Wink: 

----------

## danielrm26

Greetings,

I just did a new install of 1.2 on my new Special Edition WD Drive that is supposed to be as fast as SCSI in some areas.  I am still getting the same numbers that I got with my old drive, which are:

Cached:        +- 193MB

Uncached:     +- 45MB

Shouldn't the 8MB buffer (vs. 2MB for most drives) increase my speeds?  Or is it a certain kind of speeds that will be increased that isn't showing up in this benchmark?

I have done all the tweaks...I get the same numbers.  FS is EXT3.

Thanks guys,

danielrm26

----------

## SpeedD

Is there an equivilant command to tweak SCSI performance?  I have a SCSI Ultra160 drive and controller and I'd hate to think I wasn't getting full performance out of it.

TIA,

John.

----------

## sy5tematic

 *niyogi wrote:*   

> so what was the reason one would get the following error:
> 
> HDIO_SET_DMA failed: Operation not permitted
> 
> -S

 

I had a similar (if not the same) problem

Assuming that you are running as root, and using a motherboard with a fairly recent chipset in it (in my case, a via8233a), the problem is that the linux kernels in the portage tree (I was using xfs-sources) do not recognize the new chipset.  They then default to a Generic PCI IDE controller behavior, which does not support DMA.

The sign of this will be a few lines like

```

VP_IDE: chipset revision 6

VP_IDE: not 100% native mode: will probe irqs later

VP_IDE: Unknown VIA SouthBridge, contact Vojtech Pavlik <vojtech@suse.cz>

```

in the output from dmesg.

My solution was to apply Pavlik's latest patch

(I got it from http://lists.insecure.org/linux-kernel/2001/Dec/5575.html

but you could also try searching for "Vojtech Pavlik patch 8233a" on google.)

Note that this patch is written against 2.5.1 and so when I applied it against the 2.4.18 kernel you get from doing an

"emerge xfs-sources"

I had to edit one file:

/usr/src/[YourLinuxVersionHere]/include/linux/pci_ids.h

by hand, but only to make sure that the 

```

+#define PCI_DEVICE_ID_VIA_8233A      0x3147

```

definition got in the right place.

After that, I recompiled the kernel and everything was peachy.

UDMA133 works just fine on my Maxtor 80GB.

   -Sy5

----------

## c_kuzmanic

 *sy5tematic wrote:*   

> 
> 
> My solution was to apply Pavlik's latest patch
> 
> (I got it from http://lists.insecure.org/linux-kernel/2001/Dec/5575.html
> ...

 

See my post on top of this page:) Thanks for providing detailed instructions on how to incorporate this patch.Last edited by c_kuzmanic on Wed Jun 19, 2002 5:41 am; edited 1 time in total

----------

## DArtagnan

 *jay wrote:*   

> Excellent tips folks!
> 
> ```
> 
> /dev/hdb:
> ...

 

I did these steps and my HD performance remains shity  :Sad: 

hdparm -m16 -c1 -u1 -d1  /dev/hda

Timing buffer-cache reads:   128 MB in  0.39 seconds =79.87 MB/sec

 Timing buffered disk reads:  64 MB in  8.50 seconds =  23.53 MB/sec

What's going on?

My DMA is enabled in kernel and even i chhanged the kernel line in grub menu:

kernel...bla bla...ide0=dma hda=autotune

( ide0=dma hda=autotune are described in /usr/src.../Doc.../ide.txt )

----------

## c_kuzmanic

 *pacman wrote:*   

> 
> 
> I did these steps and my HD performance remains shity 
> 
> hdparm -m16 -c1 -u1 -d1  /dev/hda
> ...

 

Is your chipset fully supported and configured in your kernel? Also, some people make the mistake of putting two harddrives on one ide controller in a master/slave configuration. One ide-channel per drive is best, otherwise you'll get decreased performance regardless of proper dma/chipset configuration.

----------

## AutoBot

What speed is your harddrive pacman ?

----------

## DArtagnan

 *AutoBot wrote:*   

> What speed is your harddrive pacman ?

 

liviu@mousehouse liviu $ su

Password:

mousehouse liviu # hdparm -tT /dev/hda

mousehouse liviu # hdparm -qc1 -qd1 -qS120 -qu1 -qk1 /dev/hda

/dev/hda:

 Timing buffer-cache reads:   128 MB in  2.58 seconds = 49.71 MB/sec

 Timing buffered disk reads:  64 MB in  2.71 seconds = 23.62 MB/sec

mousehouse liviu # exit

----------

## AutoBot

Sorry what I was trying to say is it a 5400rpm or 7200rpm ?

----------

## DArtagnan

well, it's 40 Gb IBM so : 7200 RPM

----------

## Hamshrew

This has been asked once before, but is there any way to tune SCSI hard drives?  The only thing I've found is a mention of using module parameters to enable TCQ, but I don't have my adapter loaded as a module.

These are my current results:

/dev/sda:

 Timing buffer-cache reads:   128 MB in  0.54 seconds =239.25 MB/sec

 Timing buffered disk reads:  64 MB in  1.63 seconds = 39.26 MB/sec

Is that standard?

Also, anyone know how to set up the drives on a 3ware controller properly?  Or do I need to rely on the hardware to handle it?  Here's the results for that, for several 7200 rpm drives in a RAID 10

/dev/sdb:

 Timing buffer-cache reads:   128 MB in  0.55 seconds =234.00 MB/sec

 Timing buffered disk reads:  64 MB in  2.17 seconds = 29.51 MB/sec

The RAID results seem a little low to me.

----------

## AutoBot

 *pacman wrote:*   

> well, it's 40 Gb IBM so : 7200 RPM

 

Ok I was just checking, your performance should be above what your getting indeed.

----------

## kyefun

I have a Maxtor 20 GB 7200 RPM harrddrive

Just wondering if these results meet the Standards

Settings:

     /dev/ide/host0/bus1/target0/lun0/disc:

      setting 32-bit I/O support flag to 1

      setting using_dma to 1 (on)

      setting xfermode to 68 (UltraDMA mode4)

      I/O support  =  1 (32-bit)

      using_dma    =  1 (on)

Results:

/dev/ide/host0/bus1/target0/lun0/disc:

 Timing buffer-cache reads:   128 MB in  0.96 seconds =133.33 MB/sec

 Timing buffered disk reads:  64 MB in  2.47 seconds = 25.91 MB/sec

The Results Vary by Around 10MB

(highest was 140.83 for cached and 28 for non-cache)

Is this Normal?

----------

## delta407

133.33 MB/sec... you're maxing out your IDE bus. That's a Good Thing.  :Very Happy: 

----------

## kormoc

DeletedLast edited by kormoc on Mon Dec 24, 2018 9:11 am; edited 1 time in total

----------

## AutoBot

Are you sure it can actually use it though?

----------

## abhishek

Ae there sime tests I can run that would show some effcts of dma? Here's waht I started with:

```
Timing buffer-cache reads:   128 MB in  0.80 seconds =160.60 MB/sec

 Timing buffered disk reads:  64 MB in 10.40 seconds =  6.15 MB/sec

```

 Then I tryed hdparm -c 1 -d 1 /dev/hda and got 

```
Timing buffer-cache reads:   128 MB in  0.81 seconds =157.44 MB/sec

 Timing buffered disk reads:  64 MB in  1.67 seconds = 38.39 MB/sec
```

 Then setting udma mode 5 didnt change much. After setting that i got 

```
Timing buffer-cache reads:   128 MB in  0.82 seconds =156.29 MB/sec

 Timing buffered disk reads:  64 MB in  1.70 seconds = 37.62 MB/sec

```

which is virtually no diff. but its cool that i got a 6x increase with that. Seagate 7200 80gig. btw, maybe this should be moved to tweaks, even though it started as hardware?

----------

## abhishek

 *c_kuzmanic wrote:*   

> This is for those of you with a kt266/82XX chipset:
> 
> Contrary to what you might think this chipset was not fully supported until recently, when code  submitted by Vojtech Pavlik was incorporated into the 2.4.19-pre9.patch . None of the kernels that you can emerge through portage have that patch, so if you want full support for that chipset you have to build your own patched kernel. Keep in mind that this patch is a work in progress.
> 
> So what you need to do is emerge vanilla sources, then head over to ftp.kernel.org get 2.4.19-pre9.patch and apply that patch to the vanilla sources.  
> ...

 

Really? my soyo dragon runs fine with 2.4.19-gentoo-r7. My drives work decently.

----------

## felysium

 *data_the_android wrote:*   

>  *c_kuzmanic wrote:*   
> 
> quote
> 
>  
> ...

 

The patch is already in gentoo-sources.

You only have to compile support for VIA chipset in the kernel.

I forgot to do that first and my system overall speed was really slow, although I switched dma on to the hdd...

----------

## abhishek

 *felysium wrote:*   

> 
> 
> The patch is already in gentoo-sources.
> 
> You only have to compile support for VIA chipset in the kernel. 
> ...

 

Cool. Go gentoo!

----------

## cyc

damn, since i use xfs i cant use the gentoo-sources. or does that work

----------

## cyc

omg, is this normal:

hdparm -tT /dev/hda

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.50 seconds =256.00 MB/sec

 Timing buffered disk reads:  64 MB in  1.59 seconds = 40.25 MB/sec

I have a 40 GB Seagate, 7200 rpm, using xfs how said before. seems to be great performance

----------

## AutoBot

 *cyc wrote:*   

> omg, is this normal:
> 
> hdparm -tT /dev/hda
> 
> /dev/hda:
> ...

 

That does appear to be great performance.

----------

## ee99ee2

WOAH

Here's a before

```
Timing buffer-cache reads: 128 MB in 0.42 seconds =159 MB/sec

Timing buffered disk reads: 64 MB in 2.76 seconds = 3.23 MB/sec
```

And amazeingly, here's after "hdparm -c3 -m16 -X69 -d1 -u1" on /dev/hde and /dev/hdg:

```
Timing buffer-cache reads: 128 MB in 0.42 seconds =160 MB/sec

Timing buffered disk reads: 64 MB in 2.76 seconds = 40.25 MB/sec
```

Both of those above are an average of about 4 tests on both hard drives.... none of them were off more then 1 MB/sec between every other one.

Question:

What's my bottlekneck that's causeing the Timing buffer-cache read to top out at 160 MB/sec? I've been people with over 200. This ATA/100 UDMA5 on 2 7200RPM Maxtor 60GB HD's w/ 2MB Cache.

Another question that's kinda scary:

I booted into single user mode to try this the first time, and when I rebooted back into normal mode, none of the settings were saved. In fact, I noticed that every time I changed it, it wouldn't be saved after a reboot. So I just aded the command to my /etc/conf.d/local.start file and it works fine now. BUT, one major thing... when I set it to UDMA, even though my mobo is suppost to support it, I get the following error in /var/log/messages:

```
ide2: Speed warnings UDMA 3/4/5 is not functional.

ide3: Speed warnings UDMA 3/4/5 is not functional.
```

I got to reading about it on Google, and I found that UDMA has been disabled in my IDE chipset b/c it's not stable? How can I get around this, and what would happen if I forced it to run at UDMA5 all the time, which I can do with the local.start script.

Is there somewhere I can put the same thing that's in my local.start script to get hdparm to change the HD mode before everything starts loading so my system will boot up faster?

-ee99ee2

----------

## Sp4rky

I'm having the same problem.

My mb (abit VT6X4) support ATA66 (that would be udma4).

My HD (Maxtor 91531U3) supports ATA66:

```
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 *udma4
```

But I get the following warning when I do hdparm -X 68:

```
ide0: Speed warnings UDMA 3/4/5 is not functional.
```

The performance i'm getting so far:

```

Timing buffer-cache reads:   128 MB in  0.89 seconds =143.82 MB/sec

 Timing buffered disk reads:  64 MB in  2.66 seconds = 24.06 MB/sec
```

When I read this thread, that isn't a very bad performance, but I wonder if it would be any better if I was able to set -X 68.

Could the CDRom drive (also on ide0) prevent this?

On ide1 there's a cd burner (hp9100+), so I think that is why they put (didn't built this machine myself) on ide0.

Someone an idea on how to force udma4 performance?

Ruud

[EDIT]

so oke i was a bit hasty with the keyboard. Turns out I didn't have VIA support compiled in the kernel. Did that and now -X68 doesn't give the error/warning. However, performance hasn't improved a bit[/EDIT]

----------

## whansard

Don't get all caught up in the numbers here.  The point of this all isn't to get

the highest numbers you can, its really to get the the controller and chipset

set up to transfer data as fast as the drive can.  As soon as you get the

controller set up to run as fast as the drive can, you will not see any more 

significant performance increases.  I have an old 7200 rpm udma 66 drive

that will only transfer data at 16 mb's a sec when configured correctly.  Its

that the drive was one of the first to come out at that speed, and thats as

fast as the heads can read the data from the platters.  I have a new one

thats udma 133 that reads at 46 mb's a sec.  

You ought to test your computer at these different settings by running

something like

time dd if=/dev/zero of=1000mbfile bs=1000k count=1000

That will time your machine writing a 1 gig file.  Be sure to delete it.

thats one way you can see the real performance differences.

By the way, I've found that dd transfers much faster with the larger

block sizes, so i changed the defaults in the code on my machine and

recompiled it.  Call me crazy.

----------

## swat

Hmm..

Ok - I have tried applying optimizations:

/dev/hde:

 Model=MAXTOR 6L060J3, FwRev=A93.0500, SerialNo=663201217072

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

 RawCHS=16383/16/63, TrkSize=32256, SectSize=21298, ECCbytes=4

 BuffType=DualPortCache, BuffSize=1819kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117266688

 IORDY=on/off, tPIO={min:120,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 udma6

 AdvancedPM=no WriteCache=enabled

 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 1:  1 2 3 4 5

sudo /sbin/hdparm -u 1 -m 16 -c 1 -d 1 /dev/hde

Yet i still only get:

/dev/hde:

 Timing buffer-cache reads:   128 MB in  1.02 seconds =125.00 MB/sec

 Timing buffered disk reads:  64 MB in  1.67 seconds = 38.25 MB/sec

Any ideas why it isn't any better ?  :Sad: 

swat

----------

## dioxmat

 *Quote:*   

> 
> 
> /dev/hde:
> 
> Timing buffer-cache reads: 128 MB in 1.02 seconds =125.00 MB/sec
> ...

 

hey, this is quite good :)

you might want udma6, though I dont know if you will actually notice any difference...

btw, I see everyone here is using -m 16 ... 

Always been using -m 32  (yes my disks do suppor that :)

btw, a quote from the hdparm manual :

 *Quote:*   

> 
> 
> Western Digital  recommends lower settings of 4 to 8 on many of their drives, due tiny (32kB) drive buffers and non-optimized  buffering algorithms.  
> 
> The -i flag can be used to find the maximum setting supported by an installed drive (look for MaxMultSect  in  the  output). 
> ...

 

this is probably not true any more with modern disks, but you never know :)

----------

## squareroot

 *Sp4rky wrote:*   

> I'm having the same problem.
> 
> My mb (abit VT6X4) support ATA66 (that would be udma4).
> 
> My HD (Maxtor 91531U3) supports ATA66:
> ...

 

Sp4rky, you were lucky you didn't have faster drives.  The reason for the limitation, and kernel option, is that a lot of machines with buggy Via chipsets can have "massive file corruption"   :Shocked:  if UDMA modes > 2 (33MB/s) are enabled.  

I found out the hard way over a year ago.  Everything tested good until I transferred over 100 MB. at once at >32 MB/s.  UDMA 2 can never sustain this rate.  It is barely possible with UDMA 4, fairly common with UDMA 5.  I did a good bit of testing settings before I used them for real work.  

Until I had a disk where data came off the head fast enough to sustain that rate it wasn't even possible.  (Forget the big numbers on the outside of the box.) If I hadn't had >100 MB. of RAM there wouldn't have been such a transfer anyway.  Other people had no trouble until they installed a new sound card.  It isn't worthwhile to find out what you can get away with.  

Gentoo kernels have the Via option set by default.  People, don't turn it off if you ever plan to run it on a machine with a Via 686a or 686b chip.  (Some may still be sold AFAIK. )  The easy option for software is to permanently limit performance.  Gentoo is different.

----------

## Parabola

Nice!  My new numbers:

```

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.54 seconds =237.04 MB/sec

 Timing buffered disk reads:  64 MB in  1.59 seconds = 40.25 MB/sec

```

I am also interested in if there is anything like this for the SCSI side.  Currently my ATA is outperforming my SCSI.   :Sad: 

----------

## squanto

```
Maxtor 60 gig 5400 drive:

/dev/hdb:

 Timing buffered disk reads:  64 MB in  2.25 seconds = 28.43 MB/sec

/dev/hdb:

 Timing buffer-cache reads:   128 MB in  0.50 seconds =254.47 MB/sec

WD Special Edition 80 gig 7200 drive with 8MB of cache:

/dev/hda:

 Timing buffered disk reads:  64 MB in  1.39 seconds = 45.98 MB/sec

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.48 seconds =267.22 MB/sec

```

I think I am saturating my bus  :Laughing:  pretty well.

I like my WD Special Edition  :Very Happy: 

Andrew

----------

## pilla

Don't forget that buffer-cache reads only use memory access (no access to the disk)

from man hdparm 

```

-T     Perform  timings  of cache reads for benchmark and comparison pur-

              poses.  For meaningful results, this operation should be  repeated

              2-3  times  on  an otherwise inactive system (no other active pro-

              cesses) with at least a couple of megabytes of free memory.   This

              displays the speed of reading directly from the Linux buffer cache

              without disk access.  This measurement is essentially  an  indica-

              tion  of the throughput of the processor, cache, and memory of the

              system under test.  If the -t flag is also specified, then a  cor-

              rection  factor  based  on  the outcome of -T will be incorporated

              into the result reported for the -t operation.

```

This is an interesting link (I've posted in another thread also) 

http://linux.oreillynet.com/pub/a/linux/2000/06/29/hdparm.html

----------

## squanto

Bloody Bastard: thank you for enlightening me. I did not know that.  Now it makes sense that my 2 drives would have similar ratings for buffered cache reads.    :Razz: 

Andrew

Can anyone beat my 45.98MB / sec? just curious.  I run ReiserFS with notail on my WD special edition, on Epox 8KHA+ board.    :Question: 

----------

## pilla

You're welcome  :Cool: 

BTW, you should run benchmarks more than one time to get relevant results.  I would say at least 7 times (I would be more confortable with 20), but I'm not taking in account statisc rules -- just magic numbers.

 *squanto wrote:*   

> Bloody Bastard: thank you for enlightening me. I did not know that.  Now it makes sense that my 2 drives would have similar ratings for buffered cache reads.   
> 
> Andrew
> 
> Can anyone beat my 45.98MB / sec? just curious.  I run ReiserFS with notail on my WD special edition, on Epox 8KHA+ board.   

 

----------

## squanto

 *Bloody Bastard wrote:*   

> You're welcome 
> 
> BTW, you should run benchmarks more than one time to get relevant results.  I would say at least 7 times (I would be more confortable with 20), but I'm not taking in account statisc rules -- just magic numbers.

 

I ran it  8 times, and they were all within 1MB/sec of that number, but I can post all if you want   :Razz:  , but anyways, not that it is a competition, I am just happy that my $107 didn't go to waste, but actually got me a high proformance drive for once.

Now if only I could afford an opteron.... :drool: :drool:

```
bash-2.05a$ su

Password: 

bash-2.05a# hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:  64 MB in  1.40 seconds = 45.81 MB/sec

bash-2.05a# hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:  64 MB in  1.41 seconds = 45.26 MB/sec

bash-2.05a# hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:  64 MB in  1.39 seconds = 45.91 MB/sec

bash-2.05a# hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:  64 MB in  1.39 seconds = 46.04 MB/sec <-I beat myself

bash-2.05a# hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:  64 MB in  1.39 seconds = 45.98 MB/sec

bash-2.05a# hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:  64 MB in  1.40 seconds = 45.81 MB/sec

bash-2.05a# hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:  64 MB in  1.40 seconds = 45.88 MB/sec

bash-2.05a# hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:  64 MB in  1.39 seconds = 45.91 MB/sec

bash-2.05a# hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:  64 MB in  1.40 seconds = 45.85 MB/sec

bash-2.05a# uptime

 11:36am  up 2 days,  2:42,  1 user,  load average: 0.40, 0.83, 0.94

:D

```

Andrew

----------

## TEB

Hi, very interested thread. I have seen the same problems here.

I have 2 cases : 1 Compaq EVO N800c and a selfbuilt rack mounted server.

The Compaq EVO N800c uses an Intel 845 chipset on a vanilla RH7.3 kernel.

The selfbuilt server uses an Intel E7500 chipset on a tweaked 2.4.19 customkernel with 3ware 7500-12 controller support inbuilt.

Ok i used the following commands in HDparm for the ide-drive (maxtor 160gb 5400rpm):

[root@videoserver f1]# hdparm -X69 -d1 -u1 -m16 -c3 /dev/hda       

/dev/hda:

 setting 32-bit I/O support flag to 3

 setting multcount to 16

 setting unmaskirq to 1 (on)

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 setting xfermode to 69 (UltraDMA mode5)

 multcount    = 16 (on)

 I/O support  =  3 (32-bit w/sync)

 unmaskirq    =  1 (on)

 using_dma    =  0 (off)

The following benchmark on both /dev/hda through the ICH2 controller and /dev/sda through the 3ware controller:

[root@videoserver f1]# hdparm -Tt /dev/hda                                           

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.28 seconds =457.14 MB/sec

 Timing buffered disk reads:  64 MB in 14.51 seconds =  4.41 MB/sec

/dev/sda:

 Timing buffer-cache reads:   128 MB in  0.29 seconds =441.38 MB/sec

 Timing buffered disk reads:  64 MB in  0.48 seconds =133.33 MB/sec

I compiled the 2.4.19 kernel with support for the Intel Piix driver. And the 3ware card is on a 266MB max speed (64bitx33mhz). Could it be that there some switch to turn it from 32bit to 64bit ? so in fact its using 32bit mode now?

Anyway over to the portable. I was very dissapointet with the speed here. Its a 1.7ghz P4 with a 5400rpm toshiba drive. I hoped to get more than this:

[root@localhost root]# hdparm -Tt /dev/hda

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.35 seconds =365.71 MB/sec

 Timing buffered disk reads:  64 MB in 11.33 seconds =  5.65 MB/sec

[root@localhost root]# hdparm -c1 -d1 -u1 -X69  /dev/hda

/dev/hda:

 setting 32-bit I/O support flag to 1

 setting unmaskirq to 1 (on)

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 setting xfermode to 69 (UltraDMA mode5)

 I/O support  =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  0 (off)

Well i see the same problem here.  Thou i use a stock kernel from RH.73 i would guess the 845 chipset was supported in DMA mode and not in Generic IDE mode.

When i do a hdparm -I /dev/hda i get:

[root@localhost root]# hdparm -I /dev/hda

/dev/hda:

non-removable ATA device, with non-removable media

        Model Number:           TOSHIBA MK4019GAX                       

        Serial Number:          52IC0366T           

        Firmware Revision:      FA001A  

Standards:

        Supported: 1 2 3 4 5 

        Likely used: 5

Configuration:

        Logical         max     current

        cylinders       16383   17475

        heads           16      15

        sectors/track   63      63

        bytes/track:    0               (obsolete)

        bytes/sector:   0               (obsolete)

        current sector capacity: 16513875

        LBA user addressable sectors = 78140160

Capabilities:

        LBA, IORDY(can be disabled)

        ECC bytes: 46   Queue depth: 1

        Standby timer values: spec'd by standard, no device specific minimum

        r/w multiple sector transfer: Max = 16  Current = 16

        Advanced power management level: 128

        DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma3 udma4 udma5 

             Cycle time: min=120ns recommended=120ns

        PIO: pio0 pio1 pio2 pio3 pio4 

             Cycle time: no flow control=120ns  IORDY flow control=120ns

Commands/features:

        Enabled Supported:

           *    NOP cmd

           *    READ BUFFER cmd

           *    WRITE BUFFER cmd

           *    Host Protected Area feature set

           *    look-ahead

           *    write cache

           *    Power Management feature set

                Security Mode feature set

           *    SMART feature set

                SET MAX security extension

           *    Advanced Power Management feature set

Security: 

        Master password revision code = 65534

                supported

        not     enabled

        not     locked

                frozen

        not     expired: security count

        not     supported: enhanced erase

        36min for SECURITY ERASE UNIT. 

HW reset results:

        CBLID- above Vih

        Device num = 0 determined by CSEL

Checksum: correct

When i do a dmesg i get:

Linux version 2.4.18-3 (bhcompile@daffy.perf.redhat.com) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)) #1 Thu Apr 18 07:37:53 EDT 2002

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000001ffd0000 (usable)

 BIOS-e820: 000000001ffd0000 - 000000001fff0c00 (reserved)

 BIOS-e820: 000000001fff0c00 - 000000001fffc000 (ACPI NVS)

 BIOS-e820: 000000001fffc000 - 0000000020000000 (reserved)

On node 0 totalpages: 131024

zone(0): 4096 pages.

zone(1): 126928 pages.

zone(2): 0 pages.

Kernel command line: auto BOOT_IMAGE=linux ro root=303 BOOT_FILE=/boot/vmlinuz-2.4.18-3 hdc=ide-scsi

ide_setup: hdc=ide-scsi

Initializing CPU#0

Detected 1694.525 MHz processor.

Console: colour VGA+ 80x25

Calibrating delay loop... 3381.65 BogoMIPS

Memory: 513856k/524096k available (1119k kernel code, 9852k reserved, 775k data, 280k init, 0k highmem)

Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)

Inode cache hash table entries: 32768 (order: 6, 262144 bytes)

Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)

Buffer cache hash table entries: 32768 (order: 5, 131072 bytes)

Page-cache hash table entries: 131072 (order: 7, 524288 bytes)

CPU: Before vendor init, caps: 3febf9ff 00000000 00000000, vendor = 0

CPU: L1 I cache: 12K, L1 D cache: 8K

CPU: L2 cache: 512K

CPU: After vendor init, caps: 3febf9ff 00000000 00000000 00000000

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU:     After generic, caps: 3febf9ff 00000000 00000000 00000000

CPU:             Common caps: 3febf9ff 00000000 00000000 00000000

CPU: Intel(R) Pentium(R) 4 Mobile CPU 1.70GHz stepping 04

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

POSIX conformance testing by UNIFIX

mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)

mtrr: detected mtrr type: Intel

PCI: PCI BIOS revision 2.10 entry at 0xf031f, last bus=3

PCI: Using configuration type 1

PCI: Probing PCI hardware

Unknown bridge resource 2: assuming transparent

PCI: Using IRQ router PIIX [8086/248c] at 00:1f.0

PCI: Found IRQ 10 for device 02:0e.1

PCI: Sharing IRQ 10 with 02:08.0

PCI: Sharing IRQ 10 with 02:0e.0

PCI: Sharing IRQ 10 with 02:0e.2

isapnp: Scanning for PnP cards...

isapnp: No Plug & Play device found

Linux NET4.0 for Linux 2.4

Based upon Swansea University Computer Society NET3.039

Initializing RT netlink socket

apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16)

Starting kswapd

VFS: Diskquotas version dquot_6.5.0 initialized

pty: 2048 Unix98 ptys configured

Serial driver version 5.05c (2001-07-0 :Cool:  with MANY_PORTS MULTIPORT SHARE_IRQ SERIAL_PCI ISAPNP enabled

ttyS00 at 0x03f8 (irq = 4) is a 16550A

ttyS02 at 0x03e8 (irq = 4) is a 16550A

Real Time Clock Driver v1.10e

block: 992 slots per queue, batch=248

Uniform Multi-Platform E-IDE driver Revision: 6.31

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

PIIX4: IDE controller on PCI bus 00 dev f9

PCI: Device 00:1f.1 not available because of resource collisions

PIIX4: (ide_setup_pci_device:) Could not enable device.

hda: TOSHIBA MK4019GAX, ATA DISK drive

hdc: DW-28E, ATAPI CD/DVD-ROM drive

ide2: ports already in use, skipping probe

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

hda: 78140160 sectors (40008 MB), CHS=5168/240/63

ide-floppy driver 0.99.newide

Partition check:

 hda: hda1 hda2 hda3

Floppy drive(s): fd0 is 1.44M

FDC 0 is a National Semiconductor PC87306

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

ide-floppy driver 0.99.newide

md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27

md: Autodetecting RAID arrays.

md: autorun ...

md: ... autorun DONE.

NET4: Linux TCP/IP 1.0 for NET4.0

IP Protocols: ICMP, UDP, TCP, IGMP

IP: routing cache hash table of 4096 buckets, 32Kbytes

TCP: Hash tables configured (established 32768 bind 32768)

Linux IP multicast router 0.06 plus PIM-SM

NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.

RAMDISK: Compressed image found at block 0

Freeing initrd memory: 121k freed

VFS: Mounted root (ext2 filesystem).

Journalled Block Device driver loaded

kjournald starting.  Commit interval 5 seconds

EXT3-fs: mounted filesystem with ordered data mode.

Freeing unused kernel memory: 280k freed

Adding Swap: 521632k swap-space (priority -1)

usb.c: registered new driver usbdevfs

usb.c: registered new driver hub

PCI: Found IRQ 10 for device 02:0e.0

PCI: Sharing IRQ 10 with 02:08.0

PCI: Sharing IRQ 10 with 02:0e.1

PCI: Sharing IRQ 10 with 02:0e.2

usb-ohci.c: USB OHCI at membase 0xe0888000, IRQ 10

usb-ohci.c: usb-02:0e.0, NEC Corporation USB

usb.c: new USB bus registered, assigned bus number 1

hub.c: USB hub found

hub.c: 3 ports detected

PCI: Found IRQ 10 for device 02:0e.1

PCI: Sharing IRQ 10 with 02:08.0

PCI: Sharing IRQ 10 with 02:0e.0

PCI: Sharing IRQ 10 with 02:0e.2

usb-ohci.c: USB OHCI at membase 0xe088a000, IRQ 10

usb-ohci.c: usb-02:0e.1, NEC Corporation USB (#2)

usb.c: new USB bus registered, assigned bus number 2

hub.c: USB hub found

hub.c: 2 ports detected

ehci-hcd.c: $Revision: 1.1 $ USB 2.0 'Enhanced' Host Controller (EHCI) Driver

ehci-hcd.c: block sizes: qh 96 qtd 96 itd 160 sitd 64

PCI: Found IRQ 10 for device 02:0e.2

PCI: Sharing IRQ 10 with 02:08.0

PCI: Sharing IRQ 10 with 02:0e.0

PCI: Sharing IRQ 10 with 02:0e.1

hcd.c: ehci-hcd @ 02:0e.2, PCI device 1033:00e0 (NEC Corporation)

hcd.c: PCI latency reduced to max 34

hcd.c: irq 10, pci mem e08b4000

usb.c: new USB bus registered, assigned bus number 3

ehci-dbg.c: ehci_start hcs_params 0x2395 dbg=0 cc=2 pcc=3 ports=5

ehci-dbg.c: 02:0e.2: ehci_start portroute 1 0 1 0 0 

ehci-dbg.c: ehci_start hcc_params 0x0002 caching 0 uframes 256/512/1024

ehci-hcd.c: reset 80002 cmd (park)=0 ithresh=8 period=1024 Reset HALT

ehci-hcd.c: init 10000 cmd (park)=0 ithresh=1 period=1024 HALT

ehci-hcd.c: USB 2.0 support enabled, EHCI rev 0.95

hcd.c: 02:0e.2 root hub device address 1

hub.c: USB hub found

hub.c: 5 ports detected

EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,3), internal journal

kjournald starting.  Commit interval 5 seconds

EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,1), internal journal

EXT3-fs: mounted filesystem with ordered data mode.

SCSI subsystem driver Revision: 1.00

scsi0 : SCSI host adapter emulation for IDE ATAPI devices

  Vendor: TEAC      Model: DW-28E            Rev: A.0B

  Type:   CD-ROM                             ANSI SCSI revision: 02

parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,EPP]

parport0: irq 7 detected

eepro100.c:v1.09j-t 9/29/99 Donald Becker http://www.scyld.com/network/eepro100.html

eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others

PCI: Found IRQ 10 for device 02:08.0

PCI: Sharing IRQ 10 with 02:0e.0

PCI: Sharing IRQ 10 with 02:0e.1

PCI: Sharing IRQ 10 with 02:0e.2

eth0: OEM i82557/i82558 10/100 Ethernet, 00:08:02:64:9C:D7, IRQ 10.

  Board assembly 000000-000, Physical connectors present: RJ45

  Primary interface chip i82555 PHY #1.

  General self-test: passed.

  Serial sub-system self-test: passed.

  Internal registers self-test: passed.

  ROM checksum self-test: passed (0x04f4518b).

Linux Kernel Card Services 3.1.22

  options:  [pci] [cardbus] [pm]

PCI: Found IRQ 11 for device 02:06.0

Yenta IRQ list 0298, PCI irq11

Socket status: 30000006

cs: IO port probe 0x0c00-0x0cff: clean.

cs: IO port probe 0x0100-0x04ff: excluding 0x378-0x37f 0x4d0-0x4d7

cs: IO port probe 0x0a00-0x0aff: clean.

Linux agpgart interface v0.99 (c) Jeff Hartmann

agpgart: Maximum main memory to use for agp memory: 439M

agpgart: Detected Intel i845 chipset

agpgart: AGP aperture is 256M @ 0x60000000

[drm] AGP 0.99 on Unknown @ 0x60000000 256MB

[drm] Initialized radeon 1.1.1 20010405 on minor 0

Intel 810 + AC97 Audio, version 0.21, 07:42:52 Apr 18 2002

PCI: Found IRQ 5 for device 00:1f.5

PCI: Sharing IRQ 5 with 02:04.0

PCI: Setting latency timer of device 00:1f.5 to 64

i810: Intel ICH3 found at IO 0x4400 and 0x4000, IRQ 5

i810_audio: Audio Controller supports 6 channels.

ac97_codec: AC97 Audio codec, id: 0x4144:0x5363 (Unknown)

i810_audio: AC'97 codec 0 Unable to map surround DAC's (or DAC's not present), total channels = 2

ide0: unexpected interrupt, status=0x58, count=1

ide0: unexpected interrupt, status=0x58, count=2

ide0: unexpected interrupt, status=0x58, count=3

ide0: Speed warnings UDMA 3/4/5 is not functional.

ide0: Speed warnings UDMA 3/4/5 is not functional.

ide0: Speed warnings UDMA 3/4/5 is not functional.

ide0: Speed warnings UDMA 3/4/5 is not functional.

ide0: Speed warnings UDMA 3/4/5 is not functional.

ide0: Speed warnings UDMA 3/4/5 is not functional.

ide0: unexpected interrupt, status=0x58, count=4

ide0: Speed warnings UDMA 3/4/5 is not functional.

Anyone have any idea what i should do to add DMA support to the kernel for both machines? Even on the portable it locks up when i try to send much data on the pure-ftpd thats running on it. Well it doesnt lockup but it sorta stops for a few seq's even if TOP says pureftp uses 25% cpu and not 100%

best regards dragmore

----------

## pilla

The problem may be in your network card. eepro100 is known by having some problems.... make a search in Gentoo forums and I 'm sure you'll find some valuable info about it.

----------

## m00re

For all of you out there who get

>> HDIO_SET_DMA failed: Operation not permitted

on your machine with a VIA VT8235 Southbridge: get the new VIA IDE drivers for your kernel (v3.35). It finally solved my hd speed problem.

Get it at VIA IDE Drivers v3.35 by Vojtech Pavlik. Replace your old via82xxx.c in drivers/ide and have fun.

Attention: On my system, I had to edit Line 520 from

>> } #endif /* CONFIG_BLK_DEV_IDEDMA */

to

>> } 

>> #endif /* CONFIG_BLK_DEV_IDEDMA */

Hope I can help some of you with that.

----------

## idl

```
/dev/hdb:

 Timing buffer-cache reads:   128 MB in  0.61 seconds =210.18 MB/sec

 Timing buffered disk reads:  64 MB in  1.39 seconds = 46.18 MB/sec

```

  :Smile: 

----------

## Lefungus

Before :

 Timing buffer-cache reads:   128 MB in  0.22 seconds =581.82 MB/sec

 Timing buffered disk reads:  64 MB in 16.09 seconds =  3.98 MB/sec

Then i do : hdparm -c 1 -d 1 -u 1 -m 16 -X 70 /dev/hda with my maxtor drive

 Timing buffer-cache reads:   128 MB in  0.22 seconds =581.82 MB/sec

 Timing buffered disk reads:  64 MB in  1.60 seconds = 40.00 MB/sec

I think the last one is better  :Smile: 

----------

## ragingwolf

Sweet, my speeds were boosted by alot:

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.68 seconds =188.24 MB/sec

 Timing buffered disk reads:  64 MB in  2.28 seconds = 28.07 MB/sec

/dev/hde:

 Timing buffer-cache reads:   128 MB in  0.66 seconds =193.94 MB/sec

 Timing buffered disk reads:  64 MB in  1.33 seconds = 48.12 MB/sec

Both from ~3MB/sec and both are ide drives.  Man, this post is a god send, before, doing anything in the background (compiling, copying etc) my music would stutter so bad, now it fixed  :Smile: . btw I noticed that in my current kernel, dma isn't enabled by default, if i enabled and recompiled with the via82C... option, will it enable by default?

----------

## heijs

Before:

/dev/hdg:

 Timing buffer-cache reads:   128 MB in  0.71 seconds =180.28 MB/sec

 Timing buffered disk reads:  64 MB in 13.72 seconds =  4.66 MB/sec

After:

/dev/hdg:

 Timing buffer-cache reads:   128 MB in  0.72 seconds =177.78 MB/sec

 Timing buffered disk reads:  64 MB in  1.63 seconds = 39.26 MB/sec

I'm happy   :Very Happy: 

----------

## newky2000

I have the same problem with hdparm saying the same thing.

I know that dma works on these drives as it was enabled when using the livecd disk.

Is there anything that should be enabled in the kernel?

 *pr0vidence wrote:*   

>  *wombat wrote:*   This command: hdparm -c 1 -d 1 -k 1 /dev/hdc
> 
> Gives me this response:
> 
> /dev/hdc:
> ...

 

----------

## pablo_pita

 *newky2000 wrote:*   

> 
> 
> Is there anything that should be enabled in the kernel?
> 
> 

 

I also have this problem ... I can not setup the DMA in a new HITACHI hard disk to on. So, I am stuck with poor hard disk performance. I have been compiling the kernel with different options but no luck yet. 

The hard disk is :

ATA device, with non-removable media

        Model Number:       HITACHI_DK23DA-20

        Serial Number:      115ENL

        Firmware Revision:  00J2A0A1

Standards:

        Used: ATA/ATAPI-5 T13 1321D revision 3

        Supported: 5 4 3 2 & some of 6

The IDE controller is  (from /proc/pci):

  Bus  0, device  31, function  1:

    IDE interface: Intel Corp. 82801CAM IDE U100 (rev 2).

      IRQ 5.

      I/O at 0x0 [0x7].

      I/O at 0x0 [0x3].

      I/O at 0x0 [0x7].

      I/O at 0x0 [0x3].

      I/O at 0x1860 [0x186f].

      Non-prefetchable 32 bit memory at 0x20000000 [0x200003ff].

The options I have:

# ATA/IDE/MFM/RLL support

CONFIG_IDE=y

# IDE, ATA and ATAPI Block devices

CONFIG_BLK_DEV_IDE=y

# IDE, ATA and ATAPI Block devices

CONFIG_BLK_DEV_IDE=y

# CONFIG_BLK_DEV_HD_IDE is not set

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_IDEDISK_MULTI_MODE=y

# CONFIG_IDEDISK_STROKE is not set

# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set

# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set

# CONFIG_BLK_DEV_IDEDISK_IBM is not set

# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set

# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set

# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set

# CONFIG_BLK_DEV_IDEDISK_WD is not set

# CONFIG_BLK_DEV_IDECS is not set

CONFIG_BLK_DEV_IDECD=y

# CONFIG_BLK_DEV_IDETAPE is not set

# CONFIG_BLK_DEV_IDEFLOPPY is not set

CONFIG_BLK_DEV_IDESCSI=m

CONFIG_IDE_TASK_IOCTL=y

CONFIG_IDE_TASKFILE_IO=y

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_PCI_WIP is not set

# CONFIG_BLK_DEV_IDEDMA_TIMEOUT is not set

# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set

# CONFIG_AMD74XX_OVERRIDE is not set

# CONFIG_IDE_CHIPSETS is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_BLK_DEV_IDE_MODES=y

----------

## pablo_pita

Maybe I am getting a bit off topic here. I found the following information about my IDE controller (Intel's 82801CAM IDE U100 controller),  which I barely understand but seems to be the reason of why  hdparm -d 1 /dev/hda fails: 

Mode Data Corruption

Problem:

DMA compatible mode on the secondary channel causes data corruption on primary channel. If a device on one of the IDE interfaces (e.g., the secondary channel), is operating in Multi-Word DMA Mode with compatible timings where the cycle time is 600 ns, while a device on the other interface (primary channel) is running in PIO mode), the IDE PIO pre-fetch buffer will inadvertently provide an extra piece of secondary channel data to the primary device resulting in data corruption. This happens when DMAREQ is deasserted and a DMA transaction is running while a PIO transaction  

is outstanding on the other channel.

Implication:

Systems configured in this manner may experience a situation in which the DMA IDE controller transfers incorrect data from the PIO configured device. Exactly how this manifests itself in a system is dependent on the system activity at the time.

Workaround:

When BIOS is determining which mode(s) an IDE device is capable of, it must not set the DMA capable bits in the ICH3-M if that device only supports Mode-0 DMA or slower. That device should be configured for PIO instead.

Status:

There are no plans to fix this erratum.

Is this the really reason why "hdparm -d 1 /dev/hda" does not work ? Any enlightment about what is going on ?

----------

## newky2000

I have since learned that DMA for the ICH4 chipset will not work in the 2.4.19 kernel.  It does however wrok very well in the 2.4.20 kernel.  This is the one that the livecd uses and it is also the version for the vanilla-sources aswell.

I compiled and tested the 2.4.20 and it worked great with the drives, i forgot to re-link /usr/src/linux the the new kernel and it caused problems with X.

 *pablo_pita wrote:*   

> Maybe I am getting a bit off topic here. I found the following information about my IDE controller (Intel's 82801CAM IDE U100 controller),  which I barely understand but seems to be the reason of why  hdparm -d 1 /dev/hda fails: 
> 
> Mode Data Corruption
> 
> Problem:
> ...

 

----------

## Delphiki

From an 80gb 7200 rpm seagate, using udma5 I get 

 *hdparm -tT /dev/hda wrote:*   

> /dev/hda:
> 
>  Timing buffer-cache reads:   128 MB in  0.58 seconds =219.18 MB/sec
> 
>  Timing buffered disk reads:  64 MB in  3.66 seconds = 17.51 MB/sec

 

dma is turned on, I've tried 

The options enabled are

 *hdparm /dev/hda wrote:*   

> /dev/hda:
> 
>  multcount    = 16 (on)
> 
>  IO_support   =  1 (32-bit)
> ...

 

I turned on multcount (it was 0). I also set UDMA to 5 like I said, but neither seems to have any effect at all on my transfer speed. This seems really low for a 7200 rpm hd on a 1533 mhz athlon system and in fact my second hd, a 5200 Maxtor gets the following.

 *hdparm -tT /dev/hdb wrote:*   

> 
> 
> /dev/hdb:
> 
>  Timing buffer-cache reads:   128 MB in  0.56 seconds =226.95 MB/sec
> ...

 

The settings are the same as far as I can tell.. 

Any suggestions would be appreciated.

----------

## pilla

Delphiki, are you sure you have support for your specific chipset enabled in your kernel?

----------

## Delphiki

I have VIA82 CXXX chipset support compiled in and according to dmesg it finds my VIA vt8233 (rev 00) IDE UDMA100 controller on pci00:11.1

----------

## new2lin

```
/dev/hdb:

 Timing buffer-cache reads:   128 MB in  0.35 seconds =365.71 MB/sec

 Timing buffered disk reads:  64 MB in  1.39 seconds = 46.04 MB/sec

```

Not too bad ... thanks for the tip, oh and I have the Via 8235, 2.4.20 vanilla kernel patched to pre3. WD 7200 RPM (8MB buffer   :Very Happy:  ).

----------

## pablo_pita

 *Quote:*   

> 
> 
> Is this the really reason why "hdparm -d 1 /dev/hda" does not work ? Any enlightment about what is going on ?

 

I got hdparm to set up the DMA to on ! 

I had to compile some other options in the kernel to get the support. 

I saw in the hdparm source that setting DMA failed on the call to ioctl. I downloaded the 2.4.20-r1 kernel, checked more flags, especially if they had something to do with ioctl or with DMA (and of course, the IDE drive) ... and voila.

----------

## moonshade

60 Gb Maxtor 6Y060L0, i845G chipset

```

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.28 seconds =457.14 MB/sec

 Timing buffered disk reads:  64 MB in  1.36 seconds = 47.58 MB/sec

```

 :Very Happy: 

----------

## mxller

nice   :Very Happy: 

```

bash-2.05b# hdparm -tT /dev/hdb

 

/dev/hdb:

 Timing buffer-cache reads:   128 MB in  0.45 seconds =284.44 MB/sec

 Timing buffered disk reads:  64 MB in 17.25 seconds =  3.71 MB/sec

bash-2.05b# hdparm -m 16 -c 1 -u 1 -d 1  /dev/hdb

 

/dev/hdb:

 setting 32-bit IO_support flag to 1

 setting multcount to 16

 setting unmaskirq to 1 (on)

 setting using_dma to 1 (on)

 multcount    = 16 (on)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

bash-2.05b# hdparm -tT /dev/hdb

 

/dev/hdb:

 Timing buffer-cache reads:   128 MB in  0.46 seconds =278.26 MB/sec

 Timing buffered disk reads:  64 MB in  1.60 seconds = 40.00 MB/sec

```

----------

## Donovan

Tried it here on two PCs, one ancient (Cyrix M200) another not so ancient Abit BH6 (440) + Celeron 466 Mendocino.  Neither machine received any appreciable benefit from the settings change.

On the Celery based machine, does that have something to do with this?

 *Quote:*   

> 
> 
> Uniform Multi-Platform E-IDE driver Revision: 6.31
> 
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> ...

 

Curious...  :Smile:   I have 440 support enabled in my kernel (and no others).

----------

## Forse

Maxtor 120gig 7200rpm running in ATA133:

```
homer Sources # hdparm -vTt /dev/hdg

/dev/hdg:

 multcount    = 16 (on)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 80 (on)

 geometry     = 14946/255/63, sectors = 240121728, start = 0

 Timing buffer-cache reads:   128 MB in  1.42 seconds = 90.14 MB/sec

 Timing buffered disk reads:  64 MB in  1.34 seconds = 49.76 MB/sec
```

----------

## klausx

hy there,

gor an Asus P4G8X (Intel 7205). And get

 *Quote:*   

> 
> 
> /dev/hda:
> 
>  setting using_dma to 1 (on)
> ...

 

Anyone knows a fix ?

Thanks

    Klausx

----------

## Anubis

Got the same thing myself...:

 HDIO_SET_DMA failed: Operation not permitted

 setting xfermode to 70 (UltraDMA mode6)

 multcount    = 16 (on)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  0 (off)

bash-2.05b# hdparm -tT /dev/hda

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.61 seconds =209.84 MB/sec

 Timing buffered disk reads:  64 MB in 17.25 seconds =  3.71 MB/sec

on my IBM 60giger.

----------

## Anubis

anyone have any idea on this?

----------

## dberkholz

Results of hdparm -vtT, representative of average of 3

Western Digital 120GB, 7200 RPM, Model 1200BB

 *Quote:*   

> /dev/hda:
> 
>  multcount    = 16 (on)
> 
>  IO_support   =  0 (default 16-bit)
> ...

 

40 GB, 7200 RPM

 *Quote:*   

> /dev/hdb:
> 
>  multcount    = 16 (on)
> 
>  IO_support   =  0 (default 16-bit)
> ...

 

20 GB laptop drive

 *Quote:*   

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

 

----------

## 3vilinside

 *tanksimpson wrote:*   

> 
> 
> hdparm -qc 1 -qd 1 -qk 1 /dev/hda
> 
> 

 

What exactly is the -k tag in this command?

----------

## volospin

I don't know how I did it...  I didn't set anything...

but my hdparm -Tt results on my

Maxtor 5400rpm 2MB Cache 20GB Harddisk is

 Timing buffer-cache reads:   128 MB in  1.10 seconds =116.36 MB/sec

 Timing buffered disk reads:  64 MB in  1.72 seconds = 37.21 MB/sec

with the following result from hdparm /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    =  8 (on)

  geometry     = 2491/255/63, sectors = 40020624, start = 0

and my WD 7200rpm 8MB Cache 80GB Harddisk is

 Timing buffer-cache reads:   128 MB in  1.10 seconds =116.36 MB/sec

 Timing buffered disk reads:  64 MB in  1.38 seconds = 46.38 MB/sec

with the following result from hdparm /dev/hdb

  multcount    = 16 (on)

  IO_support   =  0 (default 16-bit)

  unmaskirq    =  0 (off)

  using_dma    =  1 (on)

  keepsettings =  0 (off)

  readonly     =  0 (off)

  readahead    =  8 (on)

  geometry     = 9729/255/63, sectors = 156301488, start = 0 

the DMA Mode is max out already... I am running on a i810e chipset

I wonder if I get squeeze more performance out of this chipset + HD?

Especially the low "timing buffer-cache reads" speed... since others

are getting something like 4xxMB/sec

----------

## pilla

AFAIK, there is no IDE hard drive that can do 400MB/sec  :Smile: 

You probably read wrong, it must be 40MB/sec. Your results are quite good and I don't think you can get much more than that.

 *volospin wrote:*   

> 
> 
> the DMA Mode is max out already... I am running on a i810e chipset
> 
> I wonder if I get squeeze more performance out of this chipset + HD?
> ...

 

----------

## volospin

ehh... Bloody Bastard...

I said and mean the timing buffer-cache reads...

not the timing buffered disk reads...

does it mean my cache is slow or something?

Since the following appears, or how do I increase above my 116MB/sec

 *moonshade wrote:*   

> 60 Gb Maxtor 6Y060L0, i845G chipset
> 
> ```
> 
> /dev/hda:
> ...

 

----------

## bzugda

 *Bloody Bastard wrote:*   

> AFAIK, there is no IDE hard drive that can do 400MB/sec 

 

I know it's an old post but I couldn't resist rising to that statement  :Smile: 

```

rogue root # hdparm -tT /dev/hda

/dev/hda:

 Timing buffer-cache reads:   1452 MB in  2.00 seconds = 726.00 MB/sec

 Timing buffered disk reads:  138 MB in  3.01 seconds =  45.79 MB/sec

```

Although, tbh the reason I'm here is 'cos everything goes to shit when I run "updatedb"  :Sad: 

Volospin, I would've thought the cache read was (perhaps obviously) a property of the amount of cache your drive has though I'm pretty sure mines only 2mb

----------

## Sylgeist

I am getting 116.xx for the buffer and 38.xx for the disk amounts. I know that is not bad but I have two drives in my machine - both Western Digital, one is a special edition with 8MB cache and the other is a 2MB version. I get exactly the same numbers every time. On my other machine with the exact same drives (but different chipset) I get 900MB on buffer score and 45 on disk. Am I maxed out on my VIA chipset for speed? Why is the 8MB cache not giving better results?

----------

## AnvilDemon

 *Sylgeist wrote:*   

> I am getting 116.xx for the buffer and 38.xx for the disk amounts. I know that is not bad but I have two drives in my machine - both Western Digital, one is a special edition with 8MB cache and the other is a 2MB version. I get exactly the same numbers every time. On my other machine with the exact same drives (but different chipset) I get 900MB on buffer score and 45 on disk. Am I maxed out on my VIA chipset for speed? Why is the 8MB cache not giving better results?

 

Could be the program is using a file size that will fit in the 2MB cache and since it uses the same file size for 8MB cache it is only effected by the latency of the cache. 

If you tested with a file that is bigger than 2MB you would see your difference immediately as the 2MB cache HDD would not be able to put the info into the cache. It would have to break up the info or file occordingly. If I use a file that is 15MB in size and pull it from the HDDto another HDD then the 2MB cache drive would have to break the file into 8 different sections during the transfer. With the 8MB cache drive it would only have to break it up 2 times. So the 8MB drive can send the file much faster overall as long as the size is larger and not smaller than the 2MB drive's cache.

----------

## Sylgeist

Thanks for the info - that makes sense, but why the big difference between my two machines?

----------

## AnvilDemon

 *Sylgeist wrote:*   

> Thanks for the info - that makes sense, but why the big difference between my two machines?

 

The only thing I can think of is driver optimizations. Or the throughput of the chipset is at it's max for the Via. 

What is the other chipset you are using?

----------

## ang

```

hdparm -Tt /dev/md7

 

/dev/md7:

 Timing buffer-cache reads:   1112 MB in  2.00 seconds = 554.61 MB/sec

 Timing buffered disk reads:  132 MB in  3.00 seconds =  43.93 MB/sec

```

I got these results on an AMD2k, w 512MB ram on via kt400 w. Highpoint 20276 controller w 2 60GB Maxtor 6Y060L0 hdds in SOFTWARE RAID 1.

```

PDC20276: IDE controller on PCI bus 00 dev 78

PDC20276: chipset revision 1

PDC20276: not 100% native mode: will probe irqs later

PDC20276: (U)DMA Burst Bit ENABLED Primary MASTER Mode Secondary MASTER Mode.

    ide2: BM-DMA at 0xd400-0xd407, BIOS settings: hde:pio, hdf:pio

    ide3: BM-DMA at 0xd408-0xd40f, BIOS settings: hdg:pio, hdh:pio

VP_IDE: IDE controller on PCI bus 00 dev 89

PCI: No IRQ known for interrupt pin A of device 00:11.1 - using IRQ 255

VP_IDE: chipset revision 6

VP_IDE: not 100% native mode: will probe irqs later

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci00:11.1

    ide0: BM-DMA at 0xe400-0xe407, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xe408-0xe40f, BIOS settings: hdc:DMA, hdd:pio

hda: Maxtor 6Y060L0, ATA DISK drive

hdc: TEAC CD-W552E, ATAPI CD/DVD-ROM drive

hdg: Maxtor 6Y060L0, ATA DISK drive

```

following some good instructions from

https://forums.gentoo.org/viewtopic.php?t=51&highlight=hdparm

and

https://forums.gentoo.org/viewtopic.php?t=8813&highlight=software+raid+install

```

/etc/conf.d/local.start

hdparm -qc 1 -qd 1 -qk 1 -qX 70 /dev/hda

hdparm -qc 1 -qd 1 -qk 1 -qX 70 /dev/hdg

```

The trick is to put the two drives of the raid 1 on separate ide controllers:

/dev/hda utilises the on-board ide controller, whereas /dev/hdg is on the highpoint controller.

----------

## drekka

Hello everyone, read this thread with interest and thought I might ask your oinions on why I can't run higher than 25M/sec stable. I can get 41M/sec but the system crashses within a minute or two with lots of IO errors.

Asus A7N8X Deluxe with Sil3112 SATA raid controller.

2 x Seagate 120G SATA drives in raid 0.

ac-sources kernel.

hdparm gives:

 Timing buffer-cache reads:   1612 MB in  2.00 seconds = 806.00 MB/sec

 Timing buffered disk reads:   76 MB in  3.00 seconds =  25.33 MB/sec

Boot up hdparm settings are :

disc0_args="-c1 -A1 -d1 -X70 -m16 -u1"

disc1_args="-c1 -A1 -d1 -X70 -m16 -u1"

I've used the max_kb_per_request trick to get to 41M/sec, but as I said it was not stable. The default setting for these drives is 15, which is the setting everyone recommends. I had to go higher to 24 or greater to get faster speeds. 

Any thoughts,

Derek.

----------

## AnvilDemon

drekka, I have two raptors. They used to be in a raid 0 but not anymore. I used the -d1 and -X70 command only. I have the Abit NF7-S with the silraid controller, same as you. My system seemed stable for about two weeks then one day it just locked up and I lost everything. So now I use the drives independent on the controller with the same settings and I have not had a problem yet.

I know this does not help much but atleast it is some information.

----------

## vbenares

Okay.  Try and explain these numbers:

Timing buffer-cache reads:  1668 MB/sec

Timing buffered disk reads:  3.1 MB/sec 

What the heck is going on?!  And how do I fix it?

----------

## vbenares

I should have mentioned, it's a Seagate 80 GB, 7200 RPM, Serial ATA, w/ 8 MB Cache. Model number ST380023AS.

----------

## lamaistres

Check this out:

# hdparm -T /dev/hda

/dev/hda:

 Timing buffer-cache reads:   688 MB in  2.01 seconds = 342.29 MB/sec

hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:   96 MB in  3.04 seconds =  31.63 MB/sec

using "hdparm -X68 -m16 -u1 -c1 -a64 /dev/hda"

688 MB in 2.01 seconds?

----------

## TobiWan

This thread really is interesting. That whole hdparm issue should be included in the installation manual at least for setting the dma and keep that when rebooting.

Maybe we can collect a couble of good hdparm settings for different purposes like:

a device running a root partition with the system, applications and the swap file

a device holding a grand collection of medium sized files like mp3 or jpg which get accessed a lot

a device holding a mysql or any other database

I guess you get my point here. Make some more propositions and we can start collecting settings. I am even willing to write a hdparm summary afterwards and translate it into German and Dutch. Maybe French too if there's enough people interested in that language.  :Smile: 

Tobias

----------

## viperlin

hey guys (and the few girls, there nees to be more girls here) , sorry but people in this thread should be able to help me with my problem it's similar ,but no it's not an unsearched simple thing (i hope to jebus it was though)

anyway details here

hopefully you can help me out, sorry for posing this type of thing but my comps goin a little slow because of it.Last edited by viperlin on Wed Aug 20, 2003 10:25 pm; edited 2 times in total

----------

## TobiWan

 *viperlin wrote:*   

> hey, sorry but people in this thread should be able to help me with my problem, no it's not an unsearched simple thing (i hope to jebus it was though)

 

Sorry   :Shocked: 

I didn't want to steal away any attention towards your problem. I just thought this thread might be the right place to collect what's being written here concerning the ideal settings for hdparm. No offense meant. Really.   :Embarassed: 

cheers,

Tobias

----------

## viperlin

erm u missunderstood it, i'm just trying to attract attention to my thread for help, since it's a chipset hdparm problem, darn chipsets, why cant it be hamster powered

----------

## fdavid

I have a Quantum lct20 20G (ATA100, 5400rpm), and a Samsung SP P80 80G (ATA133, 7200rpm). My mainboard supports ATA100. On the ide channel of th Quantum there is also a CD-writer configured as slave.

hdparm recognizes the Samsung running in udma5, the Quantum running in udma2. When i disconnect the cd-writer the Quantum runs in udma5, as well.

So, here are my hdparm results:

Samsung (udma5):

-t: 53.78; 53.33; 54.24

-T: 124.27; 123.08; 125.49

Quantum (udma2 /cd-writer connected/):

-t: 18.99; 20.25; 19.88

-T: 120.75; 129.29; 129.29

Quantum (udma5 /cd-writer disconnected/):

-t: 17.07; 20.45; 20.38

-T: 110.24; 113.27; 115.32

Questions:

1. Why don't i measure significant difference between udma2 and udma5 in case of Quantum? Is it just because the values stay under approx. 33 (udma2)? How could i measure the performance difference if there's some?

2. Could be such a big performance defference between two disks running in udma5?

3. AFAIK the -T option doesn't really count, because it measures the speed of the linux memory cache, not hte disk memory cache. It has more likely sg to do with the RAM speed, but the disk speed. Is that right? (My measurements seem to prove this, i think so.)

----------

## Jung, Dong Chul

My System

P4 2.53GHz

IC35L120AVV207-1 [8MB]

zzori nvidia-glx # hdparm -vtT /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     = 16383/255/63, sectors = 241254720, start = 0

 Timing buffer-cache reads:   1952 MB in  2.00 seconds = 975.17 MB/sec

 Timing buffered disk reads:  152 MB in  3.01 seconds =  50.44 MB/sec

zzori nvidia-glx # hdparm -vtT /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     = 16383/255/63, sectors = 241254720, start = 0

 Timing buffer-cache reads:   1896 MB in  2.00 seconds = 948.14 MB/sec

 Timing buffered disk reads:  158 MB in  3.00 seconds =  52.66 MB/sec

zzori nvidia-glx #

----------

## ikaro

my drive is a Maxtor 120gb ata 133 , 7200 rpm , 2mb cache.

ive done this a long time ago, so i dont remember the old speeds, but this is what i got now:

```

/dev/hda:

 Timing buffer-cache reads:   1260 MB in  2.00 seconds = 630.00 MB/sec

 Timing buffered disk reads:  144 MB in  3.03 seconds =  47.52 MB/sec

```

settings are :

```

hdparm -X 70 -c1 -d1 -u1 /dev/hda

```

 :Smile: 

----------

## insanethrees

 *squanto wrote:*   

> Can anyone beat my 45.98MB / sec? just curious.  I run ReiserFS with notail on my WD special edition, on Epox 8KHA+ board.   

 

Since you ask, the 200GB WD SE is getting 53.3MB/sec on the Promise PCI card that it comes with.  According to the people at storagereview.com, bigger disks of the same model are always slightly faster, but I can't remember why.

----------

## j_c_p

Hello,

 *Quote:*   

> bash-2.05b# hdparm -tT /dev/hda
> 
> /dev/hda:
> 
>  Timing buffer-cache reads:   980 MB in  2.00 seconds = 490.00 MB/sec
> ...

 

I have 40 Go Maxtor DM+8 HDD on promise pdc 20276 (not in raid mode), but 

 *Quote:*   

> bash-2.05b# hdparm -i /dev/hda
> 
> /dev/hda:
> 
>  Model=Maxtor 6E040L0, FwRev=NAR61590, SerialNo=E14L6V8E
> ...

 

don't give me UDMA mode 6, why ?

 *Quote:*   

> bash-2.05b# lspci
> 
> 00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333]
> 
> 00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP]
> ...

 

----------

## zebbedi

I have a WD 160GB UIDE 8MB Cache and performance seemed rather lacking under linux compared to windows. WD also seem to be rather scared when you ask their tech support about running linux on the drive, but heres my results.

With just "hdparm -d /dev/hda" i get:

/dev/hda:

 Timing buffer-cache reads:   1772 MB in  2.00 seconds = 886.00 MB/sec

 Timing buffered disk reads:   10 MB in  3.40 seconds =   2.94 MB/sec

Then with "hdparm -m16 -c1 -d1 -u1 -k1 -X69 /dev/hda" i get:

/dev/hda:

 Timing buffer-cache reads:   1804 MB in  2.00 seconds = 902.00 MB/sec

 Timing buffered disk reads:  160 MB in  3.02 seconds =  52.98 MB/sec

Needless to say i added those lines to my hdparm config file and ran rc-update  :Smile: 

----------

## Spida

Why are you all using hdparm to benchmark your drives? bonnie++ is said to deliver much more reliable results.

 -> HDD Benchmarking Thread

----------

## grzewho

can someone explain me the usage of -A1 , -a64 and -c3 options?

----------

## MrDooM

hdparm -i /dev/hde

/dev/hde:

 Model=WDC WD600BB-00CAA1, FwRev=17.07W17, SerialNo=WD-WMA8F1124538

 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }

 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40

 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=4

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117231408

 IORDY=on/off, tPIO={min:120,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=no WriteCache=enabled

 Drive conforms to: device does not report version: 

 * signifies the current active mode

hdparm -i /dev/hdg

/dev/hdg:

 Model=WDC WD600BB-00CAA1, FwRev=17.07W17, SerialNo=WD-WMA8F1123163

 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }

 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40

 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=4

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117231408

 IORDY=on/off, tPIO={min:120,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=no WriteCache=enabled

 Drive conforms to: device does not report version: 

 * signifies the current active mode

hdparm -tT /dev/md0

/dev/md0:

 Timing buffer-cache reads:   692 MB in  2.01 seconds = 343.99 MB/sec

 Timing buffered disk reads:  116 MB in  3.00 seconds =  38.65 MB/sec

Linux Software Raid 1

MrDooM

----------

## Malakin

hdparm -T is timing the reading of the disk cache in system memory not out of the hard disks cache so the size of the hard disk cache is irrelevant. This is why people are getting around 1GB/s, if it was pulling it out of the hard disk cache then you'd be maxing out your interface speed of 100-150MB/s for most people.

Also I think the hard disk cache is invisible to the system anyways and therefore unreadable directly.

----------

## MK

Hey,

I got an old SCSI disk, and haven't optimized it at all. Any tips for enhancing performance?

/dev/sda:

 Timing buffer-cache reads:   612 MB in  2.01 seconds = 305.13 MB/sec

 Timing buffered disk reads:  118 MB in  3.00 seconds =  39.33 MB/sec

----------

## gubbs

Hit here. 

I have a Compaq SMART 431 array with 4 Wide Ultra 3 SCSI disks in Raid 0 mode. 

The device is:

bash-2.05b# cat /dev/ida/disc0/disc with the partitions showing as:

disc   part1  part2  part3  part4  

I noticed some people on other threads can benchmark /dev/sdX but I dont have that .. and when i try hdparm -tT /dev/ida/disc0/disc it rejects the device as 'not being allowed'. 

Anyone help me out? Perhaps there's some devious way I can CAT 128 mb chunks and work out the speed by the time taken or some other bash wizardy?

G.

----------

## christsong84

dunno...was told this isn't very good for an SATA disk...I'm quite new to the whole optimizing my hard drive thing...what do I need to do?

```
[96p] psalms : /home/swells $ hdparm -i /dev/hda

/dev/hda:

 Model=ST380013AS, FwRev=3.18, SerialNo=3JV8GWG8

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4

 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488

 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 

 AdvancedPM=no WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2: 

 * signifies the current active mode

[96p] psalms : /home/swells $ hdparm -Tt /dev/hda

/dev/hda:

 Timing buffer-cache reads:   2160 MB in  2.00 seconds = 1078.01 MB/sec

 Timing buffered disk reads:   28 MB in  3.68 seconds =   7.61 MB/sec

```

----------

## der_maddin

these are my stats :

```

# hdparm -vtT /dev/hda

dev/hda:

 multcount    = 16 (on)

 IO_support   =  3 (32-bit w/sync)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  1 (on)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 19457/255/63, sectors = 312581808, start = 0

 Timing buffer-cache reads:   996 MB in  2.00 seconds = 497.58 MB/sec

 Timing buffered disk reads:  160 MB in  3.02 seconds =  52.94 MB/sec

```

is this really good ?

as you can see, i own a samsung sp1614n

( 160gb, 7200rpm, 8M, u133 )

but why is the udma6 mode not available ??

i have allready set the correct kernel option for my chipset ??

i am confused.

----------

## woody77

Box: IBM T30 Laptop, 1.8 Ghz P4m, 512MB

HD:  Toshiba MK4019GAX, 40GB, 16MB Cache, WriteCache=Enabled

udma 100

-vtT

multcount = 16

io = 32bit

unmaskirq = on

using_dma = on

keepsettings = on

readadhed = 15

cache-reads = 731MB/sec

disk-reads = 26MB/sec

And that's all she wrote.  That's the best that I see.  I've played with a few other options, but that's about all I get.  I discovered it was running in 16-bit mode, and that helped it get to where it was, along with upping the read-ahead to 15 from 8, but since then, 25/26 seems to be the limit.  Not bad, for a laptop, I guess, but I really wanted to see more.

----------

## wolfpakk

Many posts here is like "look how big my d**k is" so i really need to show u guys mine  :Wink:  I have cheap hitachi/ibm disks with only 2 mb cachememory, im surprised to see that they beats much newer and more expensive disks.

This is my system disk (hitachi/ibm 80gb)

```

root@gentoo wolfpakk # hdparm -tT /dev/hda

/dev/hda:

 Timing buffer-cache reads:   1008 MB in  2.01 seconds = 502.32 MB/sec

 Timing buffered disk reads:  168 MB in  3.01 seconds =  55.86 MB/sec

```

This is my second movies/mp3 disk (hitachi/ibm 120 gb)

```

root@gentoo wolfpakk # hdparm -tT /dev/hdc

/dev/hdc:

 Timing buffer-cache reads:   1012 MB in  2.00 seconds = 506.08 MB/sec

 Timing buffered disk reads:  162 MB in  3.04 seconds =  53.32 MB/sec

```

----------

## abachn

I ran this on my P4 2.8 HT mashine and got these results. The disk is a 60 Gb maxtor disk.

/dev/hda:

 Timing buffer-cache reads:   2696 MB in  2.00 seconds = 1346.86 MB/sec

 Timing buffered disk reads:  154 MB in  3.04 seconds =  50.73 MB/sec

----------

## wsmc884

I've been trying for some time now to get my new SATA drive to perform better without success. Here are the stats:

/dev/hde:

 Timing buffer-cache reads:   1984 MB in  2.00 seconds = 990.67 MB/sec

 Timing buffered disk reads:   82 MB in  3.06 seconds =  26.84 MB/sec

/dev/hde:

 Model=ST3120023AS, FwRev=3.01, SerialNo=3KA1F0LN

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4

 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=234441648

 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 *udma6

 AdvancedPM=no WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2:

 * signifies the current active mode

/dev/hde:

 multcount    = 16 (on)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  1 (on)

 readonly     =  0 (off)

 readahead    = 256 (on)

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

I've read this entire thread and several others over the past 8 months or so but I still can't get the disk reads above 30.

I'm using kernel 2.6.3

Any suggestions?

----------

## sharky

settings:

/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     = 16383/255/63, sectors = 117210240, start = 0

results:

/dev/hda:

 Timing buffer-cache reads:   2588 MB in  2.00 seconds = 1294.20 MB/sec

 Timing buffered disk reads:  112 MB in  3.00 seconds =  37.29 MB/sec

info:

/dev/hda:

 Model=HTS726060M9AT00, FwRev=MH4OA68A, SerialNo=MRH400M4G2786A

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4

 BuffType=DualPortCache, BuffSize=7877kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117210240

 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-6 T13 1410D revision 3a:

Machine info:

Laptop powered by a P4 3200 MHz, hyperthreading enabled, 1024 MB RAM DDR333, 60 GB 7200 rpm Hitachi HDD.

----------

## RJARRRPCGP

My HDD performance results with Mandrake Linux 8.1 with Athlon T-bird 900 mhz, 256 MB PC133 SDRAM and Via KT133 chipset:

Timing buffer-cache reads: 128MB in 0.75 seconds =170.67 MB/sec

Timing buffered disk reads: 64 MB in 2.89 seconds = 22.15 MB/sec

The HDD is an IBM Deskstar 13 GB UDMA 66 7200 HDD (The reliable Deskstars before the new ones).

Is the benchmark bad?

----------

## ck42

I'm a little stumped by the performance numbers I'm seeing.  Judging from many of the (what I *think*) slower drives I see people posting, I thought my performance would be higher than it is.

I think I pretty much have the params maxed out.

-X69 -u1 -c1 -d1 -A1 -D1 -m16 -a8

/dev/hda:

 multcount    = 16 (on)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  1 (on)

 readonly     =  0 (off)

 readahead    =  8 (on)

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

 Timing buffered disk reads:   92 MB in  3.05 seconds =  30.13 MB/sec

This is with a Maxtor Diamondmax Plus 9 (7200RPM - 8mb cache).

hdparm shows that udma6 is supported but I don't think my m/b supports ata133 (if that is what udma6 is).

Am I missing anything here?Last edited by ck42 on Wed Mar 03, 2004 9:23 pm; edited 1 time in total

----------

## woody77

So, what, exactly, ARE the bottlenecks that we can run into, and what are the workarounds?

1)  Disk's own read-rate.  Obviously, we can't read from disk any faster than it can read from the platters, so the max sequential read throughput of the disk is going to be a bottleneck for disk reads.  This can be worked around with faster drives, but that's about it.

2)  HD to controller.  Next up seems to be maxing out the interface itself, (ata66/100/133, SATA150, etc.).  That's a hard-limit, but can be worked around with RAID systems, or upgrading the MB/adapter cards/drives/cables.

3) The MB's own transfer rates between the controller and the processor.  This is where it starts to get tricky.  For a controller in the Southbridge, this is dictated by the chipset, and should be much, much, much higher than any of the others.  However, if you've got a PCI-based controller, then the bottleneck is the PCI subsystem.  And that's 33Mhz at 16 bits?  or what, exactly?

From the reading on this thread, the best the hdparm can do is get the I/O subsystem running such that the bottleneck isn't the software, and how the data is being read, but instead removes all but the hardware bottlenecks that I've described above.

I can't seem to get more than 24MB/sec on my laptop.  This being a P4m, with an i845 chipset, the bottleneck is most likely the drive (ATA100/udma5), and not anything else.  It's a 5400rpm drive, but the heads are slow, so seeks are horridly slow (24ms), but the sequential read-rate also seems limited.

Those of you seeing much higher transfer rates, I'm guessing that you've got the SATA or udma6, and have drives that can take better advantage of those supporting systems.  However, it seems like bothering with the high-speed interfaces when the drives themselves can't push the data is a little useless.

SCSI is different, where you've got multiple drives on the chain, and needing 3 drives to max out the chain actually makes RAID give some BIG performance boosts (ie, RAID0 across three drives could potentially give you full SCSI saturation, and 160MB/320MB transfer rates).

I guess it depends on the cache, doesn't it?  I've got a 16MB cache, so if you're doing burst reads, you get full saturation of the pipe, but if doing large sequential reads, you can't saturate the pipe because the drive can't read the data off fast enough.

And then comes the question, what are you trying to optimize for...  And that's a whole 'nother ball of wax.

----------

## der_maddin

 *ck42 wrote:*   

> 
> 
> I think I pretty much have the params maxed out.
> 
> -X69 -u1 -c1 -d1 -A1 -D1 -m16 -a8
> ...

 

i tried this settings on my harddrive,

( wich is equal to yours, its a samsung 160gb, 8M cache, 7200rpm )

they really slowed it down :

( see post above for original settings / speeds )

```

 Timing buffer-cache reads:   1024 MB in  2.00 seconds = 510.80 MB/sec

 Timing buffered disk reads:   84 MB in  3.01 seconds =  27.91 MB/sec

```

this seems equal to the values you got.

but when played around a bit with the params even 

more than in my earlier post i get this :

```

 Timing buffer-cache reads:   1028 MB in  2.00 seconds = 513.05 MB/sec

 Timing buffered disk reads:  170 MB in  3.03 seconds =  56.11 MB/sec

```

this was achieved using 

hdparm -X69 -u1 -c3 -d1 -A1 -m16 -a256 -k1

( don't forget the keep settings - flag '-k1' )

i would recommend you to try these settings for yourself

and then report back to this thread.

--------------------------------------------------

 *woody77 wrote:*   

> 
> 
>  I've got a 16MB cache
> 
> 

 

are you serious ?? on a notebook system ?

i have never heard of a harddisks cache that 

big not even on desktop hdds and you're talking

about a notebook harddrive ??

is that possible ?

------------------------------------------------

now something quite different  :Wink: 

i do still wonder why i can't select udma6 for my harddrive.

the motherboards chipset ( a sis746 ) does support it,

so does the harddrive itself, i even use a 133 cable.

so why cant i ?

----------

## ck42

ker_maddin:

I'm using the -a8 setting because that's what hdparm reports that the drive supports.  Have you verified that your's supports the 256 setting?

Also, I was originally using the c3 option but from what I understand, c1 seems more performance oriented.  I've even tried testing using both and there's a SMALL SMALL improvement using c3.

..oh, and yes, I use the k1 setting.  Just forgot to post that when I typed in the msg.

EDIT:

Went ahead and tried the -a 256 setting.

Things DEF. improved.

Timing buffered disk reads:  162 MB in  3.02 seconds =  53.62 MB/sec

Ran this a couple of times using both c1 and c3.  Looks like the c3 option is ever so slightly faster (~1Mb/sec)...beating out the c1 setting.

thnx for the tip!Last edited by ck42 on Thu Mar 04, 2004 8:22 pm; edited 1 time in total

----------

## woody77

 *der_maddin wrote:*   

> 
> 
>  *woody77 wrote:*   
> 
>  I've got a 16MB cache
> ...

 

Well, of course it's POSSIBLE, anything like that is.  However, it is true.  Blew my mind when I found out.  I figured that the 8MB on the IBM Travelstars that it's a knockoff of was huge (40GNX?).  But it's a great drive, aside from coming from the factory with the write-cache enabled, and XP defaulting to enabled (I find it scary, but no data-loss yet, and everything I do is backed up on servers in CVS).

BTW, it was the supplied drive in my IBM Thinkpad T30.  I was definitely amused to find out it was a Toshiba knockoff of the Hitachi/IBM drive...

It's a Toshiba MK-4019GAX.  specs or  here and go to tech specs:

```

Basic Specifications & Features

   Part Number

   HDD2171*ZE

   Formatted Capacity

   40,0078 Mbyte

   Form Factor

   2.5 Inch

   Interface Type

#    ATAPI/IDE

   Interface Standards supported

#    ATA-2

# ATA-3

# ATA-4

# ATA-5

   Head/Actuator Technology

#    "Ramp-Load" Technology

# GMR Head

   Physical Parameters

      Number of Cylinders

   33,440

      Number of Heads

   4

   Number of Platters

   2

   Bytes/Sector

   512

   Shock Detection

   Shock sensor circuit

   SMART

   The SMART command set is supported.

Performance Specifications

   Average Seek Time

   12 ms

   Maximum Seek Time

   22 ms

   Track-To-Track Seek Time

   2 ms

   Internal Transfer Rate

   From 200.8 to 333.2 Mbit/s

   Host Transfer Rate

      PIO Mode

#    PIO Mode 4 (16.6 Mbyte/s)

      UDMA Mode

#    UDMA Mode 5/100 (100 MByte/s)

   Rotational Speed

   5,400 rpm

   Buffer Size

   16,384 Kbyte

   Cache

#    Read-Ahead Cache

# Write Cache
```

Last edited by woody77 on Thu Mar 04, 2004 8:23 pm; edited 1 time in total

----------

## der_maddin

at wich point does hdparm say your device only supports 8 sectors of filesystem read-ahead ??

i've tried values from 32 - 8192 ( means 16 - 4096 kB )

without hdparm arguing about, but also without any 

performance gain.

so far, i do understand that the max value for the -a

parameter could be the complete cache capacity,

that means for our devices a value of 

16384, ( 2*8192 ) as they have 8M of cache.

see this excerpt from man hdparm :

```

In  the  current  kernel  version

(2.0.10)  this  has  a default setting of 8 sectors (4KB).

```

did you see it talks about 'current' kernel version 2.0.10  :Wink: 

and its the most recent version of hdparm ( 5.5 ) i'm using !!

and the difference between -c1 and -c3 is also described in the 

hparm man file, it says that they are almost the same, only 

that -c3 uses some kind of sync sequence wich is required 

for most chipsets, but both of them use 32 bit I/O.

btw, the hdparm -t speeds are only reference values, 

the actual speeds may vary depending on the actual

size of sequential streams you read.

----------

## ck42

der_maddin:

Can't find where I found that info (-i or I) but I coulda sworn I saw it somewhere.

Other question is regarding using UDMA6.  The drive itself is an ATA133 drive but the m/b only supports ATA100 (I'll have to double check to be sure).

The info section shows that UDMA6 is available....but I'm not sure I want to set this if it's something that the m/b doesn't support.

EDIT: woops....looks like my m/b DOES support ATA133!!  time to test it   :Twisted Evil: 

OK.....no difference/improvment.  :Rolling Eyes: Last edited by ck42 on Thu Mar 04, 2004 8:35 pm; edited 1 time in total

----------

## woody77

 *der_maddin wrote:*   

> where does hdparm say your device only supports 8 sectors of filesystem 
> 
> read-ahead ??
> 
> 

 

I was about to say that it's rejected past 8, but that was multi-sector reads (-m :Cool: .

 *Quote:*   

> 
> 
> i've tried values from 32 - 8192 ( means 16 - 4096 kB )
> 
> without hdparm arguing about, but also without any 
> ...

 

Hmm.  worth playing with, but IIRC, I didn't see any performance gains past 15 or so.  But in those cases, I *think* I'm running into the limit at which the heads can read the data off the drive.  200-333Mb/sec works out to 25-41MB/sec.  However, my Linux partition is at the very end of the disk, where I know the transfer rates aren't as good.  So that might be why only 25MB or so on my drive.

----------

## der_maddin

wow, woody, i wont believe this if it wasn't true...

now you made me curious, as i own a toshiba notebook

( Satellite Pro 6100) myself.

it uses a hitachi harddrive DK23EA-60

that only has 2M of cache  :Sad: 

you are a lucky one ..

EDIT : i just looked your drive up at a local seller,

          ( because i am now somewhat jealous )

          and found out your hdd model ( MK-4026GAX )

          is listed for 139.00 euros and another bigger 

          one ( 80 GB / MK8026GAX ) is available for

          279.00.

          Perhaps i buy one of these so i can match up with 

          your specs, just because i'm really jealous right 

          now...

btw, what notebook model are you running the disk in ??

----------

## der_maddin

 *ck42 wrote:*   

> 
> 
> Other question is regarding using UDMA6.  The drive itself is an ATA133 drive but the m/b only supports ATA100 (I'll have to double check to be sure).
> 
> The info section shows that UDMA6 is available....but I'm not sure I want to set this if it's something that the m/b doesn't support.
> ...

 

lucky one.

i don't have so much luck with that.

both my hdd and my mobo do support ATA133 but 

somehow udma6 is not available for me ...  :Sad: 

----------

## woody77

You must have missed my edit where I added it's an IBM T30.  NICE laptop.

EU$130?  Not bad.  Have to check around here for prices.  Want a new drive in the other laptop (9GB, slow, and LOUD).  The GAX is silent.  audible only when seeking.

UDMA/133 is only going to get better burst rates, any sequential stuff is probably limited by the drive.  Lots of smallish reads (ie, fully from the cache) will be faster on UDMA/133, but the drive itself is the bottleneck.

The internal media transfer rate, platter rpm, and seek times are probably MUCH more important than the bus, as a single drive can't suturate the bus.

i.e., my drive is FAST, when it's all out of the cache, but if you need to go to disk, it's SLOW...  25-40MB/sec from the platters, vs. 100MB/sec from disk cache to the host.

----------

## der_maddin

woooh.

i just found some review on the t30.

saw it would cost $3,499 ( in june 2002 )

thats pretty much.

but i'm sure its worth it;

as far as i know from friends also owning an ibm 

nb, those seem to be perfectly designed.

i paid about 2,400 ? for my Satellite 

in jan of last year. it has the pentium-M 2.4 

and a geForce 4go, 60 GB harddisk.

but it lacks a touchpad.

i use it mostly for work, that 

also explains why it is the fastest system

i own ( my desktop is running 'only' an athlonXP 1900+ )

also its the only system i have running 

windows ( 2000 ).

----------

## woody77

It's a work laptop.  Home laptop is a Dell.  Not going to buy another Dell laptop.  It's WAY too flimsy.  IBM laptops are expensive, but good for people who travel on business.  They're heavy, but they're solid.  I'll take the rigidity and strength of the IBM frames over the flimsy dell ones.

But yeah, they're expensive.  Fast, but expensive.

----------

## der_maddin

i also mispicked a notebook once.

it was a gericom model '1st supersonic'

( first model on market with 1GHz )

that thing really sucked ...

i had it repaired three times 

everytime because of the same flaw.

it crashed unpredictable and the 

battery was defective after 3~5 

weeks, it was replaced all three times,

but same shit everytime..

worst of all this thing was 

expensive  :Confused: 

----------

## lintoo

I'm having troubles with my new Gentoo setup. I have a Samsung 5400rpm drive. I know for a fact it is ATA100 with DMA ability. In the BIOS I have it set for PIO mode 4 and DMA mode 5. 

When I do something like:

```
hdparm -d1 /dev/hda
```

It tells me the old "Not available". (And yes, of course I'm doing this from root  :Smile: )

My motherboard is an MSI KT3Ultra2. It has the VIA8235 chipset. I did a kernel recompile last night with the VIA8xxxx options, but I still cannot set DMA. I think this would be a major detriment to my system performance? It is not terribly slow at the moment, but speedups are always welcomed.  :Smile: 

Any help would be appreciated.

----------

## woody77

Run:

```

hdparm -tT /dev/hda

```

If the Buffered Disk Reads are <20MB/sec, then you probably have room for improvement, otherwise, you might not.

What's the result from:

```

hdparm -I /dev/hda

```

----------

## lintoo

```
hdparm -I /dev/hda

 

/dev/hda:

 

ATA device, with non-removable media

        Model Number:       SAMSUNG SV4002H

        Serial Number:      0379J1FRC54530

        Firmware Revision:  QP100-07

Standards:

        Used: ATA/ATAPI-6 T13 1410D revision 1

        Supported: 6 5 4 3

Configuration:

        Logical         max     current

        cylinders       16383   4047

        heads           16      16

        sectors/track   63      255

        --

        CHS current addressable sectors:   16511760

        LBA    user addressable sectors:   78242976

        device size with M = 1024*1024:       38204 MBytes

        device size with M = 1000*1000:       40060 MBytes (40 GB)

Capabilities:

        LBA, IORDY(cannot be disabled)

        bytes avail on r/w long: 4      Queue depth: 1

        Standby timer values: spec'd by Standard, no device specific minimum

        R/W multiple sector transfer: Max = 16  Current = 16

        Recommended acoustic management value: 128, current value: 0

        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5

             Cycle time: min=120ns recommended=120ns

        PIO: pio0 pio1 pio2 pio3 pio4

             Cycle time: no flow control=120ns  IORDY flow control=120ns

```

```
 hdparm /dev/hda

 

/dev/hda:

 multcount    = 16 (on)

 IO_support   =  3 (32-bit w/sync)

 unmaskirq    =  1 (on)

 using_dma    =  0 (off)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    =  8 (on)

 geometry     = 4870/255/63, sectors = 78242976, start = 0

```

```
hdparm -tT /dev/hda

 

/dev/hda:

 Timing buffer-cache reads:   856 MB in  2.01 seconds = 426.51 MB/sec

 Timing buffered disk reads:   18 MB in  3.07 seconds =   5.87 MB/sec

```

This is extremely poor.  :Sad: 

----------

## woody77

After some poking around, I think I found some very interesting differences in HD performances:

Seagate ST94811A, laptop ATA100 40GB drive, 5400rpm, 8MB cache:

-  Interface Transfer rate: 100MB/sec

-  Internal transfer rate: 386Mb/sec

-  Avg. sustained transfer rate: > 34.5MB/sec

-  Theoretical Max Sustained transfer rate: 48MB/sec

Seagate ST340014A, desktop ATA100 40GB drive, 7200rpm, 2MB cache:

-  Interface Transfer rate: 100MB/sec

-  Internal transfer rate: 683Mb/sec

-  Avg. sustained transfer rate: > 58MB/sec

-  Theoretical Max Sustainted transfer rate: 85MB/sec

Seagate ST380013AS, desktop SATA150 80Gb drive, 7200rpm, 8MB cache

-  Interface Transfer rate: 150MB/sec

-  Internal trasfer rate: 683Mb/sec

-  Avg. sustained transfer rate: > 58MB/sec

-  Theoretical Max Sustained trasnfer rate: 85MB/sec

Seagate ST336753LW, desktop/server SCSI-320 80GB, 15Krpm, 8MB cache

-  Interface Transfer rate: 320MB/sec

-  Internal transfer rate:  609-891Mb/sec

-  Sustained transfer rate: 57-86MB/sec

-  Theoretical Sustained Transfer rate: 76-111MB/sec

Which, I think, basically proves my thoughts that the transfer rates we're seeing in hdparm are going to max-out at the avg sustained transfer rate of the disk, which is the theoretical transfer rate, minus some overhead.  From my math, it seems there's about a 25-30% overhead, so the realistic max's are about 70-75% of the internal transfer rates for the drives.

So for my laptop, with it's 240-333Mb/s internal transfer rate, I shouldn't expect more than 22-29MB/sec of measure transfer rates.  And it falls right into that at 22-26, depending on lots of stuff.

Of course, this only is for sustained reads.  Any kind of burst traffic is likely to be much faster, but if the read-ahead buffer can't cope with it, it'll fall back to seeks and reads.

Which again seems to imply that you want rpms for low seek times, and high internal transfer rates to get it over the wire, and your interface to the system is much, much less important than your HD's internal capabilities are.

----------

## woody77

 *lintoo wrote:*   

> 
> 
> ```
> hdparm -I /dev/hda
> 
> ...

 

yah, you betcha, it's poor.   :Sad: 

Since DMA is disabled, and you can't seem to enable it, it's probably a chipset issue.  Latest kernel sources and sure that you've included the right chipset support?  Some of the chipsets were, IIRC, blacklisted for bad behavior, or perhaps it was drives...  So that might be an issue

Next, make sure that you're actually using your newly built kernel (mounted boot before you copied it over?).

And also go through the output to dmesg.  I'm sure there's something in there that's explaining why dma is being disabled.

----------

## Strukt

Ok people, lookie here!

dmesg, looks ok huh?

```
VP_IDE: IDE controller at PCI slot 0000:00:07.1

VP_IDE: chipset revision 6

VP_IDE: not 100% native mode: will probe irqs later

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci0000:00:07.1

    ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:pio, hdd:pio

hda: WDC WD800BB-75CAA0, ATA DISK drive

hdb: WDC WD800BB-00CAA1, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hda: max request size: 128KiB

hda: Host Protected Area detected.

        current capacity is 156250000 sectors (80000 MB)

        native  capacity is 156250080 sectors (80000 MB)

hda: 156250000 sectors (80000 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(100)

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3

hdb: max request size: 128KiB

hdb: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(100)

 /dev/ide/host0/bus0/target1/lun0: p1
```

Yep, two almost the same drives. One WD80GB as a master, and another WD80GB as slave.

Look beneath, drives look okay, right?

```
h0mer / # hdparm -i /dev/hda

/dev/hda:

 Model=WDC WD800BB-75CAA0, FwRev=16.06V16, SerialNo=WD-WMA8E1317211

 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }

 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40

 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156250000

 IORDY=on/off, tPIO={min:120,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=no WriteCache=enabled

 Drive conforms to: device does not report version:

 * signifies the current active mode
```

And the other drive...

```
h0mer / # hdparm -i /dev/hdb

/dev/hdb:

 Model=WDC WD800BB-00CAA1, FwRev=17.07W17, SerialNo=WD-WMA8E2822537

 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }

 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40

 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488

 IORDY=on/off, tPIO={min:120,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=no WriteCache=enabled

 Drive conforms to: device does not report version:

 * signifies the current active mode
```

Then we run some tests on /dev/hda

```
h0mer / # hdparm -tT /dev/hda

/dev/hda:

 Timing buffer-cache reads:   380 MB in  2.01 seconds = 189.08 MB/sec

 Timing buffered disk reads:    6 MB in  3.33 seconds =   1.80 MB/sec
```

And the same test on /dev/hdb

```
h0mer / # hdparm -tT /dev/hdb

/dev/hdb:

 Timing buffer-cache reads:   484 MB in  2.01 seconds = 240.24 MB/sec

 Timing buffered disk reads:   94 MB in  3.06 seconds =  30.74 MB/sec
```

The performance differs dramaticly, but i do not understand why because the drives are almost identical, they are setup the same in bios. HDA is primary master, and HDB is primary slave, on the same cable.

I do not know how to solve this problem, ofcourse i've tried disabling dma, enabling dma and so forth. No good there. I also have the correct chipset compiled directly into the kernel. (2.6.3). I recently upgraded to kernel 2.3.6 from 2.6.0 in an attempt to get rid of this problem but it didnt help.

Help me  :Wink: 

----------

## woody77

Try making the two HDs both masters (hda and hdc, and the other two drives as slaves (assuming these are opticals?)

Does that get you anything?  Seems like it's not a cabling issue, unless the master drive doesn't like the cabling or the master-slave-cs option.

Another thing to try is to swap the drives, and see how that changes things.

And yes, you'll be mucking with Grub and fstab to do all the drive swapping.

Normally it's considered good practice to put to the two fast drives on separate channels so that they don't compete with each other for bandwidth on it.

If you have a liveCD, can you boot from that?  And if so, different or the same results?  It also might help to do the swapping around when using the livecd, so you don't need to much with grub and fstab to keep everything sane.

----------

## Strukt

hi woody, or anyone else for that matter  :Smile: .

Ok, first thing first. My drive i had problems with works fine now. What i did was to take that particular drive, put it in another gentoo based computer, i ran the hdparm benchmark again, and i got the same lousy results. At that part i started to believe that the drives controllerboard was fried or something. Anyway.

I took the drive back into the original computer again, blowed away all partitions, made new ones. Made an ext3 filesystem, and after that ran some benchmarks again. And lookie... the speed is up to around 30MB / sec again.

I dunno what the problem was....but apparently a reformatted harddrive solved my particular problem... i guess the partition table was farked up somehow, we have had some powercuts here....could be related to that i presume.

Anyway, it works fine now!  :Smile: 

----------

## woody77

While I have no idea how hdparm reads the data (which access mechanism), I'm surprised that it was changed by the reformat.  Not saying it isn't true, just surprised.

Glad you've got it working.

----------

## Stieltje

Hi all.

I am building myself a new computer, and of course I want a nice fast disc to go with it..

But reading this thread, it does not seem worth the extra $ to get SATA?

with my 80 GB Seagate 7.200 I get:

```

PanzerFaust root # hdparm -tT /dev/hda

/dev/hda:

 Timing buffer-cache reads:   1352 MB in  2.00 seconds = 674.56 MB/sec

 Timing buffered disk reads:  164 MB in  3.04 seconds =  54.02 MB/sec

```

how much faster would a SATA seagate 80 GB be?

or any other SATA disk for that matter.

Thanks.

----------

## der_maddin

don't waste your $$ for the SATA - drive, it'll give 

you nothing more. Your ATA drives performance is 

just great and you would not get any better values 

using a SATA drive.

The most important feature of having a SATA - bus 

system would be that you could have a bigger number 

of disks in your system than with using simple ATA.

And the performance gain is simpy too small to pay extra money for.

----------

## ktech

der_maddin, I have a nforce-2 motherboard from abit (nfs-7 v-2.0) and I have a P-ATA hard disc (ST380023A) Barracuda-V with 80 Gb.

I'm running 2.6 kernel and I only have:

        Timing buffered disk reads:   98 MB in  3.00 seconds =  32.62 MB/sec

This is very poor, not to? I was thinking in going to SATA, because a person I know is getting 66 mb/sec out of a sata drive. It's double speed!!

What tip can you give me about this?

----------

## der_maddin

i think you should be able to get at least 

about 40 ~ 50 Mb/s out of your current P-ATA disk,

depending a bit on how big the buffer of your device

is and how fast it spins. ( and depending on your 

m/b's chipset, if you've select kernel support for your one etc .. )

EDIT : from what i've looked up 

http://www.seagate.com/support/disc/specs/ata/st380023a.html

it seems your disk has a speed of 7200rpm ( a fast one )

and 2M cache.

try this out ( being root )

```

hdparm -X69 -u1 -c3 -d1 -A1 -m16 -a256 -k1 

```

look at the output of this command and post any errors here.

after entering the command do this :

```

hdparm -t /dev/hda 

```

and report the values shown back here 

( using the settings above, i get about 55 MB/sec for my samsung

   sp1614n (160gb, 7200rpm, 8MB) thats not far away from 

  those values you know from this guy with the sata drive .. )

EDIT :  but btw the sp1614n is a great deal, it is available around here 

for about 100 euros ... that's not too much for a drive that big =]

----------

## ktech

No improvements. It seems that this controller n-force IDE has a very bad driver because another user as commented me that the same PATA hd connected to S-ATA throught a pata-2-sata converter runs faster than in PATA.

If you don't know any other tip or trick, this night I'll be testing if that SATA driver is better and report.

bash-2.05b# hdparm -X69 -u1 -c3 -d1 -A1 -m16 -a256 -k1 /dev/hda

/dev/hda:

 setting fs readahead to 256

 setting 32-bit IO_support flag to 3

 setting multcount to 16

 setting unmaskirq to 1 (on)

 setting using_dma to 1 (on)

 setting keep_settings to 1 (on)

 setting xfermode to 69 (UltraDMA mode5)

 setting drive read-lookahead to 1 (on)

 multcount    = 16 (on)

 IO_support   =  3 (32-bit w/sync)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  1 (on)

 readahead    = 256 (on)

bash-2.05b# hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:  102 MB in  3.00 seconds =  33.96 MB/sec

----------

## der_maddin

sorry, i don't know anything else to improve your performance

but i keep wondering why you can't hit at least the 40Mb/s

barrier with your drive and controller ...

----------

## ktech

yes, the same here.

I think it's a very poor performance even when I heard that some seagate drives have some issues that must be corrected at driver level in order for the drive to handle the data in a correct way.

If any of you have some ideas, I'm going to go for SATA in 2 - 3 hours.

Thanks to all of you  :Wink: 

----------

## woody77

seagate seems rather vague on the performance specs for this drive...

INTERNAL TRANSFER RATE (Mbits/sec) _______up to 570

SUSTAINED TRANSFER RATE (MB/sec)__________27 to 44

EXTERNAL TRANSFER RATE (Mbytes/sec) ______up to 100

So perhaps you're getting the best you're going to get from it.  Do an hdparm -I on each drive (yours and your friends that's faster) and see if the firmware is different, or anything else.  Could be something like that.

----------

## ktech

I cannot understand nothing.

I'm actually on SATA and the same happens. 33 mb/sec.

I'm starting to think that this drive is a little piece of shit.    :Crying or Very sad: 

----------

## woody77

That's probably 33MB/sec, not 33mb/sec.  And it's probably as fast as the drive itself can read off the platters.  And there's no way to make that faster.  It's within spec per seagate (see above comments).

----------

## Stieltje

Maybe I am just lucky with my Seagate then ?

anyway, I got a  ST380011A  drive attached to a epox8rda+ mobo (nforce2), 2.4.23-ck1 -sources

http://www.seagate.com/support/disc/specs/ata/st380011a.html

PanzerFaust root # hdparm -tT /dev/hda

/dev/hda:

 Timing buffer-cache reads:   1324 MB in  2.00 seconds = 661.53 MB/sec

 Timing buffered disk reads:  154 MB in  3.02 seconds =  51.04 MB/sec

/etc/conf.d/hdparm:

```

# You can either set hdparm arguments for each drive using disc*_args and cdrom$

# eg.

# disc0_args="-d1 -X66"

# disc1_args"-d1"

# cdrom0_args="-d1"

# Or, you can set hdparm options for ALL drives using all_args..

# eg.

# this mimics the behavior of the current script

all_args="-d1"

```

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    =  8 (on)

 geometry     = 9729/255/63, sectors = 156301488, start = 0

```

hdparm -i /dev/hda

```

/dev/hda:

 Model=ST380011A, FwRev=3.04, SerialNo=3JV0NWSH

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4

 BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488

 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=no WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2: 

 * signifies the current active mode

```

ok, maybe this is a lengthy and unecessary post, but just some figures and such to compare to your own (seagate) disc.

cheers

----------

## woody77

And in comparing specs on the two drives, the 7200.7 is faster than the ATA V is.

ATA V:

```

INTERNAL TRANSFER RATE (Mbits/sec) _______up to 570

SUSTAINED TRANSFER RATE (MB/sec)__________27 to 44

EXTERNAL TRANSFER RATE (Mbytes/sec) ______up to 100

```

7200.7

```

INTERNAL TRANSFER RATE (Mbytes/sec) ______up to 85.4

SUSTAINED TRANSFER RATE (MB/sec)__________up to 58

EXTERNAL TRANSFER RATE (Mbytes/sec) ______up to 100

```

Looks like it's faster to the tune of 32%.  And this seems to be held up by the numbers we're seeing here.  30% faster than 40MB/sec is 52MB/sec.  So it seems like you should be able to get up to at least 40 or so...  But probably not beyond that.  I wonder what the bottle-neck on your system is.

----------

## dmouritsendk

 *Stieltje wrote:*   

> Hi all.
> 
> I am building myself a new computer, and of course I want a nice fast disc to go with it..
> 
> But reading this thread, it does not seem worth the extra $ to get SATA?
> ...

 

SATA have more bandwidth available per channel(and only one device per channel), allowing for faster disks.  But ATM it seem that most SATA disks are exact replicas of IDE disk just with a evolved interface. The faster disk will come though, WD have already introduced a 10K-RPM RAPTOR line that reads about 70MB/s(which is faster than any ATA100/133 disk available, that I know of anyways  :Smile: ).

Also, one of the "big deals" about SATA is that it  makes better use of the PCI bus with its serial nature.  Allowing for 150Mb/sec transfers per channel/port, which makes it a good choice for RAID solutions with a lot of fast (+60MB/sec) disk is connected. 

But is SATA "worth it"? Dunno really, depends on what you'll use it for. If you just need a new disk with good performance, there isn't much difference between the average SATA disk and the average ATA disk. Though, if you want to stripe more than two disks delivering ~60MB/Sec the SATA solution would probably be the best(non-scsi) way to go.

Me personally, went with a Maxtor SATA drive when i made my current system, mostly because the motherboard i had bought for it had these 4 SATA port with nothing connected to them.  Since there was already a burner attached to one of the ATA133 channels, I felt that the SATA ports needed a device the most(also, SATA cables are cool lookin')  :Rolling Eyes: 

Since I only got one hard-drive in the box, I most likely wouldn't be able to notice any differences in speed as opposed to a ATA133 model of the drive. Which this head-2-head between two "identical" Maxtor drives with different interfaces clearly shows, the ATA133 is even a bit faster is some of the benchmarks. But the difference is tiny. If you try and throw a WD Raptor in to the Head-2-head, you'll get a hint of what the "future" is like for SATA. Then throw in a couple of SCSI320 models, and you got a pretty good overview what the different interfaces offer/are-good-at ATM. Its also clear from this that transfer speeds isn't everything, the 10K scsi drive transfers less data than the 10K SATA, but is a faster in 9/10 of the server benchmarks.

Of-course more disks like the Raptor will come be introduced, which utilizes more of the SATA bandwidth. Making SATA show its advantages over ATA133 more clearly in disk-2-disk comparisons.

Try looking around storagereview.com(its a good resource), compare some drives and see the results and figure out what drive(SATA, ATA or SCSI) fits ur need the best.

----------

## grzewho

 *der_maddin wrote:*   

> 
> 
> ```
> 
> hdparm -X69 -u1 -c3 -d1 -A1 -m16 -a256 -k1 
> ...

 

what`s the purpose of the -a256 and -A1 switches ?

----------

## error`

well, first my hdparm results:

```

hdparm -tT /dev/hda

 /dev/hda:

 Timing buffer-cache reads:   916 MB in  2.00 seconds = 457.38 MB/sec

 Timing buffered disk reads:  112 MB in  3.01 seconds =  37.15 MB/sec

hdparm -tT /dev/hdb

 /dev/hdb:

 Timing buffer-cache reads:   976 MB in  2.00 seconds = 487.10 MB/sec

 Timing buffered disk reads:  166 MB in  3.03 seconds =  54.85 MB/sec

hdparm -tT /dev/hdc

 /dev/hdc:

 Timing buffer-cache reads:   936 MB in  2.00 seconds = 466.90 MB/sec

 Timing buffered disk reads:   84 MB in  3.04 seconds =  27.62 MB/sec

hdparm -tT /dev/hdd

 /dev/hdd:

 Timing buffer-cache reads:   884 MB in  2.00 seconds = 441.18 MB/sec

 Timing buffered disk reads:  158 MB in  3.02 seconds =  52.24 MB/sec
```

but i got a strange problem, when im moving a file from hdb to any other drive i only get around 2-4mB/s. when im moving from hdd/hda to hdb i get around 30-45mB/s and when i moving a file from hdd to hda or otherway around i also get the full speed. so any ideas to fix the speed problem on hdb?

btw.: hdb is a samsung spinpoint 1614n (8mb cache), anyother hdd has 2mb cache and 7200rpm

best regards,

error`

----------

## ikaro

 *grzewho wrote:*   

>  *der_maddin wrote:*   
> 
> ```
> 
> hdparm -X69 -u1 -c3 -d1 -A1 -m16 -a256 -k1 
> ...

 

-a   get/set fs readahead

-A   set drive read-lookahead flag (0/1)

so with -A1 you enable the feature and then use -a256 to set it.

you can use other values as well, depending of how big you want it ( i mean the -aXXXX)

my results now:

```

/dev/hda:

 Timing buffer-cache reads:   1100 MB in  2.00 seconds = 549.26 MB/sec

 Timing buffered disk reads:  140 MB in  3.04 seconds =  46.07 MB/sec

```

i think i posted on this thread before with some results.

I use this in /etc/conf.d/hdparm

hda_args="-d1 -u1 -m16 -c1 -W1 -A1 -k1 -X70 -a64"

----------

## radonsg

hdparm /dev/hde

/dev/hde:

 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     = 20023/255/63, sectors = 321672960, start = 0

 hdparm -i /dev/hde

/dev/hde:

 Model=HDS722516VLSA80, FwRev=V34OA60A, SerialNo=VNRD3EC4CATKWM

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4

 BuffType=DualPortCache, BuffSize=7938kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455

 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

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 3a:

 * signifies the current active mode

hdparm -tT /dev/hde

/dev/hde:

 Timing buffer-cache reads:   1952 MB in  2.00 seconds = 974.20 MB/sec

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

Sata harddisk performance not that bad I feel.

----------

## CrAzYChIcK

this is a pretty good thread... 

figured i'd post a solution to a problem i had while trying to enable udma mode 6 on my drive. could not get it to do anything over udma 33, turned out it was because i didn't have the Master hdd on the end of the ide cable. worked fine after i put it on the end. udma 133 now. (i feel dumb lol) 

/dev/hda:

 Timing buffer-cache reads:   1824 MB in  2.00 seconds = 911.23 MB/sec

 Timing buffered disk reads:  144 MB in  3.04 seconds =  47.42 MB/sec

(Maxtor 6Y060L0 60GB 2MB cache ATA133 on nforce2 IDE controller)

----------

## feld

the drive i have my Linux on is slave......

so ur saying that if i swapped my drives and put it as root and redo my fstab and grub.conf to apply accordingly then it would run better?

-Feld

----------

## dungara

Hi,

  I find strange behaviour with CD-RW( /dev/hdc) on ICH5 chip.

with:

```
unmaskirq    =  1 (on)

using_dma    =  0 (off)

keepsettings =  0 (off)

readonly     =  0 (off)

readahead    = 64 (on)
```

 I get following speeds

```
 Timing cached reads:   1984 MB in  2.00 seconds = 991.16 MB/sec

 Timing buffered disk reads:   10 MB in  3.71 seconds =   2.70 MB/sec
```

now I enabled dma:

```
#hdparm -d 1 /dev/hdc

#hdparm /dev/hdc

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 64 (on)

#hdparm -tT /dev/hdc

 Timing cached reads:   1952 MB in  2.00 seconds = 975.17 MB/sec

 Timing buffered disk reads:   10 MB in  3.70 seconds =   2.70 MB/sec
```

There is no difference in speed 

 Although my cd-rw supports udma2 mode.

```
# hdparm -I /dev/hdc

..............

ATAPI CD-ROM, with removable media

        Model Number:       SONY    CD-RW  CRX225E

..............

Standards:

        Used: ATAPI for CD-ROMs, SFF-8020i, r2.5

        Supported: CD-ROM ATAPI-2

...............

Capabilities:

        LBA, IORDY(cannot be disabled)

        DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2

             Cycle time: min=120ns recommended=120ns

        PIO: pio0 pio1 pio2 pio3 pio4

             Cycle time: no flow control=227ns  IORDY flow control=120ns
```

Also when I run cdrecord

```
#cdrecord -scanbus -dev=ATAPI:/dev/hdc

..........

Warning: The related Linux kernel interface code seems to be unmaintained.

Warning: There is absolutely NO DMA, operations thus are slow.

...........
```

Any idea why there is no difference after enabling dma? 

Why  cdrecord complains that there is no dma?

PS: system config

linux-2.6.9-rc2

configured with dma enabled 

I result of harddisk(/dev/hda)

```
/dev/hda:

 Timing cached reads:   1940 MB in  2.00 seconds = 969.66 MB/sec

 Timing buffered disk reads:  170 MB in  3.01 seconds =  56.47 MB/sec
```

----------

## Sade

when i do a hdparm -tT /dev/hda i get these strange readings:

```
Timing cached reads: 2056 MB in 2.00 seconds = 1027.13 MB/sec

Timing buffered disk reads: 4 MB in 3.07 seconds = 1.30 MB/sec
```

when i test my other drive i get 990Mb/s and 35MB/s. 

i've checked the hdparm -i outputs and the only difference is the BuffType= option. 

On the a drive it is unknown and on the b drive it is DualPortCache.

How can i fix this, and get both my drives up to speed???

[EDIT]

sorry didn't realize it was an old thread.

----------

## Zorglab

 *squanto wrote:*   

> Bloody Bastard: thank you for enlightening me. I did not know that.  Now it makes sense that my 2 drives would have similar ratings for buffered cache reads.   
> 
> Andrew
> 
> Can anyone beat my 45.98MB / sec? just curious.  I run ReiserFS with notail on my WD special edition, on Epox 8KHA+ board.   

 

```
# hdparm -Tt /dev/hdc

/dev/hdc:

 Timing cached reads:   1768 MB in  2.00 seconds = 882.37 MB/sec

 Timing buffered disk reads:  164 MB in  3.00 seconds =  54.60 MB/sec
```

with -d1X69c1u1m16 on the 120GB 7200rpm Ultra ATA/100 HDD of my laptop. Quite impressive, isn't it ?

BTW I'm using reiser4, but I don't know if this affects the results, because I also have ntfs, fat32 and ext2 partitions on this disk.

----------

## Cintra

 *Sade wrote:*   

> when i do a hdparm -tT /dev/hda i get these strange readings:
> 
> ```
> Timing cached reads: 2056 MB in 2.00 seconds = 1027.13 MB/sec
> 
> ...

 

Doesn't matter, its obviously a popular thread  :Wink: 

Can you show us the full hdparm -i for both disks.

mvh

----------

## John5788

```
[/home/john5788 :: 01:11 PM :: 0]

[root@john5788.x5788.net] $ hdparm -tT /dev/hda

/dev/hda:

 Timing cached reads:   1900 MB in  2.00 seconds = 949.20 MB/sec

 Timing buffered disk reads:  166 MB in  3.03 seconds =  54.72 MB/sec

[/home/john5788 :: 01:12 PM :: 0]

[root@john5788.x5788.net] $ hdparm -i /dev/hda

/dev/hda:

 Model=HDS722580VLAT20, FwRev=V32OA60A, SerialNo=VNR21FC2RB0EZL

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=52

 BuffType=DualPortCache, BuffSize=1794kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=160836480

 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: disabled (255) WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 3a: 

 * signifies the current active mode

```

7200rpm 80gb deskstar is /dev/hda

```
[/home/john5788 :: 01:13 PM :: 0]

[root@john5788.x5788.net] $ hdparm -tT /dev/hdb

/dev/hdb:

 Timing cached reads:   1844 MB in  2.00 seconds = 922.14 MB/sec

 Timing buffered disk reads:  152 MB in  3.03 seconds =  50.22 MB/sec

[/home/john5788 :: 01:13 PM :: 0]

[root@john5788.x5788.net] $ hdparm -i /dev/hdb

/dev/hdb:

 Model=WDC WD800EB-00DJF0, FwRev=77.07W77, SerialNo=WD-WCAHL5449667

 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }

 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74

 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488

 IORDY=on/off, tPIO={min:120,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=no WriteCache=enabled

 Drive conforms to: device does not report version: 

 * signifies the current active mode

```

/dev/hdb is a 5400rpm 80gb western digital

```
[/home/john5788 :: 01:14 PM :: 0]

[root@john5788.x5788.net] $ hdparm -tT /dev/hdd

/dev/hdd:

 Timing cached reads:   1848 MB in  2.00 seconds = 923.68 MB/sec

 Timing buffered disk reads:   60 MB in  3.07 seconds =  19.53 MB/sec

[/home/john5788 :: 01:14 PM :: 0]

[root@john5788.x5788.net] $ hdparm -i /dev/hdd

/dev/hdd:

 Model=SAMSUNG SV2042H, FwRev=PK100-16, SerialNo=0263J1BR141684

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

 RawCHS=16383/16/63, TrkSize=34902, SectSize=554, ECCbytes=4

 BuffType=DualPortCache, BuffSize=426kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=39865392

 IORDY=yes, tPIO={min:120,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=no WriteCache=enabled

 Drive conforms to: ATA/ATAPI-4 T13 1153D revision 17: 

 * signifies the current active mode

```

/dev/hdd is a 20gb samsung 5400rpm.

----------

## Sade

 *Cintra wrote:*   

> [Can you show us the full hdparm -i for both disks.

 

Ok here goes:

```
/dev/hda:

 Model=ST380011A, FwRev=3.06, SerialNo=3JV1HH9N

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4

 BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488

 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=no WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2:

/dev/hdb:

 Model=Maxtor 4G120J6, FwRev=GAK819K0, SerialNo=G60L3DRE

 Config={ Fixed }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57

 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=240121728

 IORDY=on/off, tPIO={min:120,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 *udma6

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 0:
```

hda is a seagate barracuda and it is also the drive performing badly atm.

----------

## Cintra

Ok, by looking back some pages I see other Seagate drives have ' BuffType=unknown' so you can forget that..

There was at least one other Seagate with similar results to yours, 

i.e. very good 'Timing cached reads' and very low 'buffered disk reads'.

So, do you have anything set up in /etc/conf.d/hdparm and do you start hdparm when booting?

I have the following in /etc/conf.d/hdparm:

```

hda_args="-m16 -u1 -c3 -d1"

hdb_args="-m16 -u1 -c3 -d1"
```

and 'hdparm' in default run level as shown with 'rc-status -a'

Just do the following after you have edited /etc/conf.d/hdparm, if you don't have it set yet

```
 # rc-update add hdparm default

 * hdparm added to runlevel default

 * rc-update complete.

```

and see if that helps

mvh

Edit: I just came across this thread where the poster used 

```
hdparm -i -M -m 1 -d -a -c 3 -u 1 -t -T -X 69 /dev/hdx
```

on a Seagate like yours with following results

```
 Timing buffer-cache reads:   1940 MB in  2.00 seconds = 969.66 MB/sec

 Timing buffered disk reads:  160 MB in  3.02 seconds =  52.97 MB/sec
```

see https://forums.gentoo.org/viewtopic-t-167101-highlight-st380011a.html

----------

## Sade

 *Cintra wrote:*   

> So, do you have anything set up in /etc/conf.d/hdparm and do you start hdparm when booting?

 

I use this, to config the driver at bootup (i did the rc-update):

```
# cat /etc/conf.d/hdparm

hda_args="-a256A1c1d1m16u1" 

cdrom0_args="-d1c1u1
```

 *Cintra wrote:*   

> Edit: I just came across this thread where the poster used 
> 
> ```
> hdparm -i -M -m 1 -d -a -c 3 -u 1 -t -T -X 69 /dev/hdx
> ```
> ...

 

i tried those settings with these results:

```
root@jpc j # hdparm -iMm1dac3u1tTX69 /dev/hda

/dev/hda:

 setting 32-bit IO_support flag to 3

 setting multcount to 1

 setting unmaskirq to 1 (on)

 setting xfermode to 69 (UltraDMA mode5)

 multcount    =  1 (on)

 IO_support   =  3 (32-bit w/sync)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 readahead    = 256 (on)

 Model=ST380011A, FwRev=3.06, SerialNo=3JV1HH9N

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4

 BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=1

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488

 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=no WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2:

 * signifies the current active mode

 acoustic     =  0 (128=quiet ... 254=fast)

 Timing cached reads:   1984 MB in  2.00 seconds = 991.16 MB/sec

 Timing buffered disk reads:    8 MB in  3.08 seconds =   2.59 MB/sec

root@jpc j # hdparm -im1da254c3u1tTX69W /dev/hda

/dev/hda:

 setting fs readahead to 254

 setting 32-bit IO_support flag to 3

 setting multcount to 1

 setting unmaskirq to 1 (on)

 multcount    =  1 (on)

 IO_support   =  3 (32-bit w/sync)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 readahead    = 248 (on)

 Model=ST380011A, FwRev=3.06, SerialNo=3JV1HH9N

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4

 BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=1

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488

 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=no WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2:

 * signifies the current active mode

 Timing cached reads:   1988 MB in  2.00 seconds = 993.16 MB/sec

 Timing buffered disk reads:   20 MB in  3.04 seconds =   6.59 MB/sec
```

The settings u posted didn't make a difference. 

I tried setting the accoustic value manualy but that gave an error.

I also added the W value (not w) and that gave some improved results, but still much too slow.

P.S. notice how u write all the options against each other. also works in the /etc/conf.d/hdparm.

-------------------

EDIT

-------------------

I did a hdparm -I /dev/hda and this is what i found:

```
ATA device, with non-removable media

   Model Number:       ST380011A                               

   Serial Number:      3JV1HH9N            

   Firmware Revision:  3.06    

Standards:

   Used: ATA/ATAPI-6 T13 1410D revision 2 

   Supported: 6 5 4 3 

Configuration:

   Logical      max   current

   cylinders                   16383   65535

   heads      16   1

   sectors/track   63   63

   --

   CHS current addressable sectors:    4128705

   LBA    user addressable sectors:  156301488

   LBA48  user addressable sectors:  156301488

   device size with M = 1024*1024:       76319 MBytes

   device size with M = 1000*1000:       80026 MBytes (80 GB)

Capabilities:

   LBA, IORDY(can be disabled)

   bytes avail on r/w long: 4   Queue depth: 1

   Standby timer values: spec'd by Standard

   R/W multiple sector transfer: Max = 16   Current = 16

   Recommended acoustic management value: 128, current value: 0

   DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 

        Cycle time: min=120ns recommended=120ns

   PIO: pio0 pio1 pio2 pio3 pio4 

        Cycle time: no flow control=240ns  IORDY flow control=120ns

Commands/features:

   Enabled   Supported:

      *   READ BUFFER cmd

      *   WRITE BUFFER cmd

      *   Host Protected Area feature set

      *   Look-ahead

      *   Write cache

      *   Power Management feature set

      Security Mode feature set

      *   SMART feature set

      *   FLUSH CACHE EXT command

      *   Mandatory FLUSH CACHE command 

      *   Device Configuration Overlay feature set 

      *   48-bit Address feature set 

      SET MAX security extension

      *   DOWNLOAD MICROCODE cmd

      *   SMART self-test 

      *   SMART error logging 

Security: 

      supported

   not   enabled

   not   locked

   not   frozen

   not   expired: security count

   not   supported: enhanced erase

HW reset results:

   CBLID- above Vih

   Device num = 0 determined by the jumper

Checksum: correct
```

and this is the part that worries me:

```
Configuration:

   Logical      max   current

   cylinders                   16383   65535

   heads      16   1

   sectors/track   63   63
```

as u can see, my drive has more cylinders than max and less heads.

I know to little about harddrives to tell if these values are hardware related or, software.

My guess is that the number of heads and cylinders are manufactured in.

P.P.S. sorry for the long post.

----------

## Cintra

This is a real puzzle.. 

Do you have both disks on the same IDE cable?

CD/DVDs on their own IDE cable?

And what chip have you configured in 'IDE chipset support'

Does dmesg show anything interesting about IDE after you boot up, like UDMA(100)?

In fact, why not post it.. and the IDE chipset part of your .config file

mvh

I have the same..

```
Configuration:

        Logical         max     current

        cylinders       16383   65535

        heads           16      1

        sectors/track   63      63

```

----------

## Sade

 *Cintra wrote:*   

> Do you have both disks on the same IDE cable?
> 
> CD/DVDs on their own IDE cable?

 

Yes, the hdd's are on primary IDE and the cdd's are on the secondary.

 *Cintra wrote:*   

> Does dmesg show anything interesting about IDE after you boot up, like UDMA(100)?

 

Yes it does:

```
jpc linux # dmesg | grep IDE

ACPI: PCI Interrupt Link [LIDE] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

NFORCE2: IDE controller at PCI slot 0000:00:09.0

Probing IDE interface ide0...

Probing IDE interface ide1...

Probing IDE interface ide2...

Probing IDE interface ide3...

Probing IDE interface ide4...

Probing IDE interface ide5...

jpc linux # dmesg | grep UDMA

NFORCE2: 0000:00:09.0 (rev a2) UDMA133 controller

hda: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)

hdb: 240121728 sectors (122942 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(133)

hdc: ATAPI 40X DVD-ROM DVD-R CD-R/RW drive, 2000kB Cache, UDMA(33)

hdd: ATAPI 40X CD-ROM CD-R/RW drive, 4096kB Cache, UDMA(33)
```

 *Cintra wrote:*   

> In fact, why not post it.. and the IDE chipset part of your .config file

 

# snip out .config

# ATA/ATAPI/MFM/RLL support

CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

#

# Please see Documentation/ide.txt for help/info on IDE drives

#

# CONFIG_BLK_DEV_IDE_SATA is not set

# CONFIG_BLK_DEV_HD_IDE is not set

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_IDEDISK_MULTI_MODE=y

CONFIG_BLK_DEV_IDECD=y

# CONFIG_BLK_DEV_IDETAPE is not set

# CONFIG_BLK_DEV_IDEFLOPPY is not set

# CONFIG_BLK_DEV_IDESCSI is not set

# CONFIG_IDE_TASK_IOCTL is not set

#

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

CONFIG_BLK_DEV_CMD640=y

# CONFIG_BLK_DEV_CMD640_ENHANCED is not set

# CONFIG_BLK_DEV_IDEPNP is not set

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

# CONFIG_BLK_DEV_OFFBOARD is not set

CONFIG_BLK_DEV_GENERIC=y

# CONFIG_BLK_DEV_OPTI621 is not set

CONFIG_BLK_DEV_RZ1000=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

# CONFIG_BLK_DEV_AEC62XX is not set

# CONFIG_BLK_DEV_ALI15X3 is not set

CONFIG_BLK_DEV_AMD74XX=y

# CONFIG_BLK_DEV_ATIIXP is not set

# CONFIG_BLK_DEV_CMD64X is not set

# CONFIG_BLK_DEV_TRIFLEX is not set

# CONFIG_BLK_DEV_CY82C693 is not set

# CONFIG_BLK_DEV_CS5520 is not set

# CONFIG_BLK_DEV_CS5530 is not set

# CONFIG_BLK_DEV_HPT34X is not set

# CONFIG_BLK_DEV_HPT366 is not set

# CONFIG_BLK_DEV_SC1200 is not set

CONFIG_BLK_DEV_PIIX=y

# CONFIG_BLK_DEV_NS87415 is not set

# CONFIG_BLK_DEV_PDC202XX_OLD is not set

# CONFIG_BLK_DEV_PDC202XX_NEW is not set

# CONFIG_BLK_DEV_SVWKS is not set

# CONFIG_BLK_DEV_SIIMAGE is not set

# CONFIG_BLK_DEV_SIS5513 is not set

# CONFIG_BLK_DEV_SLC90E66 is not set

# CONFIG_BLK_DEV_TRM290 is not set

CONFIG_BLK_DEV_VIA82CXXX=y

# CONFIG_IDE_ARM is not set

# CONFIG_IDE_CHIPSETS is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_BLK_DEV_HD is not set

 *Cintra wrote:*   

> I have the same..
> 
> ```
> Configuration:
> 
> ...

  Ok thx, i thought i had partitioned my drive wrong or something, and i had to repartition. 

I am releived.

----------

## Cintra

Ok thanks for the lists.. 

one thing I'm not sure of is which chipset your nforce uses. lspci will show it..

The other thing is that you have a lot of chipsets set as <y>. 

It would be OK if unnecessary ones were <m>, but I don't think a number of <y> can be a good thing.

My asus p4pe uses the piix chipset.

When you do make any changes, you can set CONFIG_IDE_GENERIC=y to <>. Its for legacy ide and has been known to affect hdparm results & performance.

mvh

Edit: just found this tread https://forums.gentoo.org/viewtopic-t-183857-highlight-a7n8x+ide+chip.html with a bunch of your card's configs and they all had lots of <y> against various chipsets...  :Wink:  ?

----------

## Sade

i'm trying the settings posted on the link u supplied. I feel kinda stupid not finding that thread.

Here is a snip out if my lspci.

u say it tells me what driver to use, i don't know where to look/read.

```
jpc j # lspci -vvs 00:09.0

0000:00:09.0 IDE interface: nVidia Corporation nForce2 IDE (rev a2) (prog-if 8a [Master SecP PriP])

        Subsystem: ASUSTek Computer Inc.: Unknown device 0c11

        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-

        Status: Cap+ 6Mhz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- >TAbort- <MAbort- >SERR- <PERR-

        Latency: 0 (750ns min, 250ns max)

        Region 4: I/O ports at f000 [size=16]

        Capabilities: [44] Power Management version 2

                  Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)

                  Status: D0 PME-Enable- DSel=0 DScale=0 PME-
```

 i guess the chipset is nforce2, but i don't see it in the kernel.

----------

## Cintra

At last - if you run 'make xconfig' its easy to see a chipset called 'AMD and nvidia IDE support' or whatever, see https://forums.gentoo.org/viewtopic-t-311867-highlight-nforce2+ide+chipset.html

Thats the one where you particularly need a <y> and I assume its the one that shows up as 

```
CONFIG_BLK_DEV_AMD74XX=y
```

 which you have selected already.

The big question is whether the others, PIIX, VIA82CXXX, RZ1000, and CMD640 are affecting your performance...

I would suggest changing them to <m> first, and CONFIG_IDE_GENERIC=y to No.

If that doesn't help, it leaves the question of whether your drives are connected correctly, i.e. with the Master on the end of the cable? 

Best of luck  :Wink: 

mvh

----------

## Sade

 *Cintra wrote:*   

> If that doesn't help, it leaves the question of whether your drives are connected correctly, i.e. with the Master on the end of the cable?

  i always connect drives in that matter, but just in case i checked. and the drives are connected correctly.

i also removed all the drivers except the amd and nvidia one. (the one the thread mentioned) and i still get the same hdparm timings.

a few post back up i posted a snip ou of my dmesg witch said the drive was in UDMA(100). can that be the problem?

----------

## Cintra

Good, at least you are still in business  :Wink: 

Ref  *Quote:*   

> a few post back up i posted a snip of my dmesg which said the drive was in UDMA(100). can that be the problem?

 

I don't think so. my Western Digitals are both UDMA100 and I have buffered disk reads on both around 43.30 MB/sec.

In my case adding PIIX=<y> made a huge difference, and changing my disk cable for one of the latest round ones pushed things up to where they are now. (thats why I'm interested in this post)

I'm afraid it looks as though you are stuck, unless someone else has a brainwave? 

Alternatively you could consider investing in something like HighPoint's 'Rocket 133SB' pci adapter to run that disk on..

I'll keep my eyes open

mvh

----------

## Sade

damm, that's a downer.

----------

## Cintra

Haven't stopped thinking about your problem.. am currently doing a 'brainstorm' on it with freemind  :Wink: 

Don't suppose you have a spare disk cable to try?

Oh, do the results stay exactly the same if you repeat the -t/T test a number of times in succession?

mvh

Edit What i/o scheduler are you using?

```
# cd /sys/block/hdb/queue/

p4pe queue # cat scheduler

noop anticipatory deadline [cfq]

```

----------

## Sade

 *Cintra wrote:*   

> Don't suppose you have a spare disk cable to try?

 

I tried a brand new ATA133 cable, with same results

 *Cintra wrote:*   

> Oh, do the results stay exactly the same if you repeat the -t/T test a number of times in succession?

 

No, the results vary between 1Mb/s and 10Mb/s most times below 3Mb/s

 *Cintra wrote:*   

> Edit What i/o scheduler are you using?

 

yep like u, i use the "noop [anticipatory] deadline cfq"

P.S. i tried knoppix3.7, and it gave the same (poor) results.

P.S.S. i tried sisoft-sandra on Wxp, and it gave me a result of 45Mb/s, i don't know if it is comparable, but it clearly states the drive is capable of something more then 3Mb/s.

----------

## Cintra

Oh, the knoppix results are bad news.. however, there is one thing you could try which just might be affecting knoppix as well. 

Just above the config option where you set your amd & nvidia chipset there's an option called

```
Force enable legacy 2.0.X HOSTS to use DMA
```

I have come across a number of 'fixes' where turning this off improved poor performance, and one case where turning it on (at the same time as making PIIX = <y>...) gave better performance - it was probably PIIX which improved things as it did for me. So if its <y> try turning it off, and vice versa.

EDIT: I see from your earlier post that it wasn't set then..  :Sad: 

Another thing I wonder about is how full that disk is, i.e. % free space?

Also what filesystems are used on it's various partitions? 

Its possible btw to do 'hdparm -tT /dev/hdax' for individual partitions (forget /boot tho').

Btw did you look in /var/log/messages for DMA messages?

And, finally (for now  :Wink:  ) some guys improved results by stopping 'KDED media manager' in KDE Control center > KDE components > service manager. I've turned mine off too because it prints acres of messages if my packet-write disk is unmounted..

Hows that for some ideas  :Smile: 

Mvh

----------

## Sade

Yeah nice list of suggestions, and....

I think we(read you) naled the problem, in fact there was no problem.

i did a:

```
hdparm -tT /dev/hda1 (boot-reiser3.6) and got the usual 1.99MB/s

hdparm -tT /dev/hda3 (root-reiser3.6) and got a wonderfull 52.43MB/s

hdparm -tT /dev/hda6 (home-ext3) and got a very nice 40.77MB/s
```

i can leap with joy, and i feel stupid at the same time, knowing that the whole time there was no problem!

P.S. Cintra, thx alot for your time and effort, although there was nothing to solve, i did learn a lot in the proces, and i thank u for that.

P.P.S if you'r still intrested in my %freespace, i'm more then willing to supply  :Smile: .

----------

## Cintra

Hey thats fantastic!  :Very Happy: 

Though I think its very strange your /dev/hda results got pulled down so

Another weird problem gets fixed by perseverance... thats the great thing with the tough ones, you learn a lot on the way.

And now I have the beginnings of a great mindmap for this kind of problem in the future

All the best Sade

regards

----------

## EL CHAVO!

 *Buchu wrote:*   

> Pepoles who have an via chipset can enable in the kernel configuration HTP366 in ATA/IDE/... for user had  and i don't need hdparm optimizations ( it doesn't change nothing for me)
> 
> sleepiiiiiiiiiiiiiiiiiiiiiiiiiiiiiing zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

 

Thanks so much for this tip! Yeah, i know the post is old but I've gotta acknowledge when someone submits a good tip that was impossible to find on my own! My AZ11E mobo with via chipset would refuse to use dma, until I enabled the HPT36X in the kernel, who knew? EL CHAVO!

----------

## DeviantOne

Heya, i have a 160GB 7200RPM Maxtor, VIA PM800/8237 FSB800 motherboard and i'm getting these terrible results:

```

/dev/hda:

 Timing cached reads:   2540 MB in  2.00 seconds = 1267.66 MB/sec

 Timing buffered disk reads:   16 MB in  3.26 seconds =   4.91 MB/sec

```

when i try to set DMA on:

```

 hdparm -c 1 -d 1 /dev/hda

/dev/hda:

 setting 32-bit IO_support flag to 1

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 IO_support   =  1 (32-bit)

 using_dma    =  0 (off)

```

I've set DMA on, before the Gentoo installation (With the installation livecd) and it didn't give me any errors. I suppose that the kernel i use is missing something. I compiled 2.6.12-gentoo-r6 myself, and I clearly remember setting DMA support. Is there a method to fix this without having to compile a new kernel? Please help:)

```

x ~ #  hdparm -I /dev/hda

/dev/hda:

ATA device, with non-removable media

        Model Number:       Maxtor 6L160P0

        Serial Number:      L405RWTH

        Firmware Revision:  BAH41E00

Standards:

        Supported: 7 6 5 4

        Likely used: 7

Configuration:

        Logical         max     current

        cylinders       16383   65535

        heads           16      1

        sectors/track   63      63

        --

        CHS current addressable sectors:    4128705

        LBA    user addressable sectors:  268435455

        LBA48  user addressable sectors:  320173056

        device size with M = 1024*1024:      156334 MBytes

        device size with M = 1000*1000:      163928 MBytes (163 GB)

Capabilities:

        LBA, IORDY(can be disabled)

        Queue depth: 32

        Standby timer values: spec'd by Standard, no device specific minimum

        R/W multiple sector transfer: Max = 16  Current = 16

        Advanced power management level: unknown setting (0x0000)

        Recommended acoustic management value: 192, current value: 254

        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6

             Cycle time: min=120ns recommended=120ns

        PIO: pio0 pio1 pio2 pio3 pio4

             Cycle time: no flow control=120ns  IORDY flow control=120ns

Commands/features:

        Enabled Supported:

           *    NOP cmd

           *    READ BUFFER cmd

           *    WRITE BUFFER cmd

           *    Host Protected Area feature set

           *    Look-ahead

           *    Write cache

           *    Power Management feature set

                Security Mode feature set

           *    SMART feature set

           *    FLUSH CACHE EXT command

           *    Mandatory FLUSH CACHE command

           *    Device Configuration Overlay feature set

           *    48-bit Address feature set

           *    Automatic Acoustic Management feature set

                SET MAX security extension

                Advanced Power Management feature set

           *    DOWNLOAD MICROCODE cmd

           *    General Purpose Logging feature set

           *    SMART self-test

           *    SMART error logging

Security:

        Master password revision code = 65534

                supported

        not     enabled

        not     locked

                frozen

        not     expired: security count

        not     supported: enhanced erase

HW reset results:

        CBLID- above Vih

        Device num = 0 determined by the jumper

Checksum: correct

```

----------

## Cintra

surprisingly little about your disk model on the forum..

# lspci would be useful and 

# cat /usr/src/linux/.config | grep VIA82

# cat /usr/src/linux/.config | grep DMA

----------

## DeviantOne

```

lspci

0000:00:00.0 Host bridge: VIA Technologies, Inc.: Unknown device 0259

0000:00:00.1 Host bridge: VIA Technologies, Inc.: Unknown device 1259

0000:00:00.2 Host bridge: VIA Technologies, Inc.: Unknown device 2259

0000:00:00.3 Host bridge: VIA Technologies, Inc.: Unknown device 3259

0000:00:00.4 Host bridge: VIA Technologies, Inc.: Unknown device 4259

0000:00:00.7 Host bridge: VIA Technologies, Inc.: Unknown device 7259

0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge

0000:00:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

0000:00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

0000:00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)

0000:00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

0000:00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

0000:00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)

0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800 South]

0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)

0000:01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5200] (rev a1)

```

```

cat /usr/src/linux/.config | grep VIA82

# CONFIG_BLK_DEV_VIA82CXXX is not set

CONFIG_SND_VIA82XX=y

# CONFIG_SND_VIA82XX_MODEM is not set

```

```

CONFIG_GENERIC_ISA_DMA=y

CONFIG_ISA_DMA_API=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

```

----------

## Cintra

shouldn't this be set?

# CONFIG_BLK_DEV_VIA82CXXX is not set

----------

## 89c51

i think cintra is right 

i had similar problems (couldnt set dma, terrible performance) and i hadn't set via82cxxx in the kernel

----------

## cz0

Hm, seems I'am having a problem:

```

MiR / # hdparm -u1 -d1 /dev/sda

/dev/sda:

 setting unmaskirq to 1 (on)

 HDIO_SET_UNMASKINTR failed: Inappropriate ioctl for device

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Inappropriate ioctl for device

```

But I have something like this:

```

MiR / # hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   3452 MB in  2.00 seconds = 1725.89 MB/sec

 Timing buffered disk reads:  156 MB in  3.03 seconds =  51.52 MB/sec

```

Any Ideas how to fix 'Inappropriate ioctl for device'.

P.S. I have Seagate SATA disk on i865 (ICH5) and 2.6.15 kernel.

----------

## albright

you can try sdparm but it does not set dma; you shouldn't

need to set it

----------

## DeviantOne

compiled a new kernel, this time with the VIA82CXXX support on. getting pretty results:

/dev/hda:

 Timing cached reads:   2456 MB in  2.00 seconds = 1227.92 MB/sec

 Timing buffered disk reads:  164 MB in  3.01 seconds =  54.52 MB/sec

----------

## shickapooka800

hello, i am back in gentoo since i just got a new machine, but there are kinks....

i have both a WD raptor 74gb 10k rpm drive (presumably SATAII) and a Samsung 7200 rpm 250gb drive (presumably SATA)

they are on the built in SATA channels on an ASUS A8N32-SLI motherboard (which supports SATA RAID and SATAII via a silicon images 3132 chipset).  

here are my specifics:

```
aphelion ptolomey # sdparm /dev/sda & hdparm -tT /dev/sda

[1] 15341

    /dev/sda: ATA       WDC WD740GD-41FL  31.0

/dev/sda:

Read write error recovery mode page:

  AWRE        1

  ARRE        1

  PER         0

Caching (SBC) mode page:

  WCE         1

  RCD         0

Control mode page:

  SWP         0

 Timing cached reads:   3700 MB in  2.00 seconds = [b]1849.88 MB/sec[/b]

 Timing buffered disk reads:  206 MB in  3.02 seconds =  [b]68.21 MB/sec[/b]

[1]+  Done                    sdparm /dev/sda

aphelion ptolomey # sdparm /dev/sdb & hdparm -tT /dev/sdb

[1] 15343

/dev/sdb:

    /dev/sdb: ATA       SAMSUNG SP2504C   VT10

Read write error recovery mode page:

  AWRE        1

  ARRE        1

  PER         0

Caching (SBC) mode page:

  WCE         1

  RCD         0

Control mode page:

  SWP         0

 Timing cached reads:   3684 MB in  2.00 seconds = 1841.88 MB/sec

 Timing buffered disk reads:  218 MB in  3.02 seconds =  [b]72.09 MB/sec[/b]

[1]+  Done                    sdparm /dev/sdb

```

now, this is how it always is (it is incredibally consistent). whyis it that the buffered disc readsabove (bold) for the Samsung are always slightly better than that of the Raptor?  also, the cached reads look normal for SATA, but remember that the raptor and the motherboard support SATAII, and I have enabled the silicon images driver in the kernel (though it changed nothing! -- same numbers as before).  also the bios has a choice between RAID and SATA2 settings for the silicon graphics chipset, and I have selected both SATA2 and'disabled' with no change in results.

I checked some benchmarks on the WD Raptor online and I am indeed getting the correct numbers it seems for buffered reads, but thats very dissapointing that the regular 'ole Samsung 7200rpm is appearently a better performer (i even got it as an open package deal in a bargain bin!!).

if this keeps up and i can't fix it, i may just sell the raptor and get a 10k scsi drive and a U160 controller (because I know I could get slightly faster sppeds with ultra-scsi 160 (and only one drive on the chanel).  

any thoughts?  any pointers?

----------

## gentoobunny

 *shickapooka800 wrote:*   

> hello, i am back in gentoo since i just got a new machine, but there are kinks....
> 
> i have both a WD raptor 74gb 10k rpm drive (presumably SATAII) and a Samsung 7200 rpm 250gb drive (presumably SATA)
> 
> they are on the built in SATA channels on an ASUS A8N32-SLI motherboard (which supports SATA RAID and SATAII via a silicon images 3132 chipset).  
> ...

 

72MB/s for 1 disc is incredible and no single 10k scsi drive will beat that. I honestly even doubt that score to be honest.

----------

## clavko

I've been having some problems, hope you guys & ladies can help   :Smile: 

OK, HP 6715b notebook, 690G chipset, Sempron 3600+ etc., etc.

Booted from 2007 minimal CD, chrooted, downloaded 2008.0 stage1.

Bootstrapping went fine, elevating keywords to ~x86, --deep system...

All in all it was a really smooth ride so far, no complaints there.

I used vanilla.sources 2.6.26 (although the problem seems rather invariant of kernel version)

Kernel compiled, grub installed, fstab, reboot and ... it takes about 3 minutes to prompt.

I tried hdparm -tT /dev/sda, getting about 160-200 kB/sec on both measurement.

Being a newb, don't know which additional info you need, so please guide me...

and be patient, thanks   :Very Happy: 

EDIT

After using nohz=off kernel boot parameter, hard drive performance is normal.

Apparently there is a kernel bug regarding Mobile Sempron processors causing

different problems upon entering deeper C states. The nohz=off is also causing

processor not to reach any C states deeper than C1. Guess you can't have it all    :Sad: Last edited by clavko on Sat Aug 02, 2008 5:17 pm; edited 1 time in total

----------

## nixnut

merged above post here

----------

