LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   hard drive perfomance (https://www.linuxquestions.org/questions/linux-hardware-18/hard-drive-perfomance-19270/)

thanko 04-23-2002 09:21 PM

hard drive perfomance
 
I have a Pentium 4 2.0 GHz with 2 Western Digital hard drives installed, both UDMA 100. However both of them are reported in dmesg as UDMA(33). As far as I have been able, I've followed the instructions at www.geocities.com/ender7007/ to turn all the kernel stuff on but haven't had any luck. Am I just misinterpreting the message in dmesg? or is there something I did not do?

mcleodnine 04-23-2002 11:26 PM

What kind of cables are you using? Should be 80conductor.

Are there any other drives on the IDE chain? Each controller (Primary or secondary) will only fly at the lowest speed of any drive attached to it.

If it's none of the above I would check to see which kind of controller you are using. From the link provided, it appears that the instructions are for older 2.2.x kernels. kernels 2.4.5 and up should support ATA/66 (some 100) interfaces. Which kernel are you running?

thanko 04-24-2002 07:06 AM

Here's the scoop, Mcleodnine. Thanks for the response.

I'm running two hard drives in my system, both on the primary IDE port, both Western Digital, a WD400BB (slave) and a WD800BB (master). Linux is on the WD800. According to Western Digital's web site both drives support UDMA5, which, as I understand is ATA100. Correct me if I'm wrong. I am using an 80 conductor cable, although one conductor looks like it has been intentionally opened. There's about a 3/16" chunk between the two drive connectors missing from it . As near as I can tell I have an Intel D850MV motherboard, which also supports ATA100.

When I run "hdparm -i /dev/hda" (WD800) hdparm reports that the drive only supports up to udma2 and that the drive is running at udma2. When I run "hdparm -i /dev/hdb" (WD400) hdparm reports that the drive supports up to udma5 but that the drive is running at udma2. Which make sense if the WD800 is only running udma2.

The kernel version I'm running is 2.4.18 with RedHat 7.2. I'm not sure which options need to be enabled in the kernel so I just turned on the ones I could find suggested in www.geocities.com/ender7007/.

mcleodnine 04-24-2002 11:37 AM

The chunk of cable that has been cut out is normal - it's something to do with the cable select settings for the HDD's. According to Quantum's orignal spec for ATA/66, drives should be configured (jumpers) for 'CS' (cable select) rather than using master or slave.


The only other thing I can think of is to check which drive controller you're using and make sure you've got the kernel compiled properly for it. There's a P4 in the house with the D850 chipset on it that works nicely with Intel's ATA/100 controller. The only problem was that we have to disable APIC as it will crash otherwise. <shrug>.

thanko 04-24-2002 11:46 AM

Here's another update.

I took a cable from work (www.vibres.com, if anyone cares) and replaced the cable in the box with the one from work. The new cable did not have the wire cut out (probably not the problem), however the old cable had been installed backwards by my PC manufacturer. When I plugged the cable in correctly both drives reported (using hdparm -i /dev/hdX) that they were capable of doing UDMA5. I tuned a couple of parameters (hdparm -d 1 -X 64 /dev/hdX) and I think everything is working.

When I started up the PC after changing the cable "hdparm /dev/hd" reported that DMA was turned off. I assume it's off by default.

thanko 04-24-2002 11:48 AM

Which kernel parameters should be compiled into the kernel?

Which parameters in hdparm should be turned on?

I think I've done the following with hdparm:

-c 1 /dev/hdX
-W 1 /dev/hdX
-m 16 /dev/hdX
-d 1 /X 69 /dev/hdX

Any thing else?

mcleodnine 04-24-2002 11:55 AM

Looks to me like you solved the problem. Now try 'hdparm -tT /dev/hdX' to see what kind of performace you're getting.

DMR 04-25-2002 12:51 AM

Quote:

...and replaced the cable in the box with the one from work. The new cable did not have the wire cut out
As mcleodnine said, the cutout cable configuration had to do with the Cable Select (CS) option. Don't use it, period- Use a normal cable (as you are now), and hard-set the Master/Slave jumpers for each drive.

Quote:

however the old cable had been installed backwards by my PC manufacturer.
The new 80-pin cables consist of 40 extras ground lines added to the original 40-line ATA cables, and proper orientation of the cable is critical. Here's a link to Intel's explanation of the subject.

Quote:

When I plugged the cable in correctly both drives reported (using hdparm -i /dev/hdX) that they were capable of doing UDMA5. I tuned a couple of parameters (hdparm -d 1 -X 64 /dev/hdX) and I think everything is working.When I started up the PC after changing the cable "hdparm /dev/hd" reported that DMA was turned off. I assume it's off by default.
You did put the relevant hdparm lines in your rc.local file, yes?

thanko 04-25-2002 06:59 AM

I have not written those commands to that file yet. I'm a little nervous about doing so because I'm not entirely sure which ones are safe to play with. Do you have any suggestions?

Are the ones listed in a previous post un this thread correct?

DMR 04-26-2002 08:34 PM

You're not sure which commands are safe, or which file it's safe to put them in?

The idea of testing different values for the different parameters is only to determine what combination of settings (which could be different for each drive) yields the best performance; you aren't permanently applying any of the settings by running the tests, and they will be lost on reboot. So: do the tests, find the optimal settings, and then force those settings to be applied at each boot up by putting the relevent hdparm commands in /etc/rc.d/rc.local.

Just for reference, here's another
short, concise hdparm instruction page.

rommel 05-01-2002 03:30 AM

i just finished an install of gentoo...just have the base install compiled so far...and i added this line to /etc/conf.d/local.start ...depending on the distro your start script may be named differently

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

this sets it to initiate at boot so you dont have to reset it each time you start the system...my read went from 1.8mb/s before i set this to 38.7mb/s after


All times are GMT -5. The time now is 07:03 PM.