LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 02-05-2006, 02:34 PM   #1
drben
Member
 
Registered: May 2003
Location: Israel
Distribution: Ubuntu 5.10
Posts: 32

Rep: Reputation: 15
Have i tried everything to improve my disk performance?


I am running the following drive off my 440BX mobo.
Model Number:ST320014A
Capacity:20 GB
Speed:5400 rpm
Seek time:12.7 ms avg
Interface:Ultra ATA/100

Kernel: 2.6.12-10-686
Distro: ubuntu 5.10 (hoary)
the system performance is a little bit lacklustre, so I started hunting for solutions. using hdparm -tT:
/dev/hda:
Timing cached reads: 500 MB in 2.01 seconds = 249.04 MB/sec
Timing buffered disk reads: 40 MB in 3.10 seconds = 12.91 MB/sec
My disk info:


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


Model=ST320014A, FwRev=3.07, SerialNo=5JZGTV1N
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=off
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=39102336
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: device does not report version:


I've tried a variety of maneuvers including turning on
dev/hda:
setting 32-bit IO_support flag to 2
IO_support = 2 (16-bit)

/dev/hda:
setting multcount to 16
multcount = 16 (on)
With no improvement. Likewise running on init 1 (to exclude a gnome-effect) and running via KDE/knoppix CD.

So - apart from investing some $ in a new disk is there anything else I can try, or am I stuck with a slowish disk?

If it is a matter of a better HDD, I've been told that the 440BX can only accept up to 20GB drives. is this true?

Ben


PS. I found this interesting information on http://www.linuxjournal.com/article/8317

Quote:
hdparm -c: zero effect when using_dma=1
Submitted by Mark Lord (not verified) on Thu, 2005-05-26 09:44.

Hi, I wrote hdparm, and I wrote the Linux IDE Disk drivers. So I know how these things work.

"hdparm -c1" has ZERO effect when using DMA. None, nadda, nothing at all. The two code paths do NOT intersect within the kernel at all.

Oh, ditto (as per my comment above) for "-m". Multisector mode (-m) applies only when NOT using DMA. Fiddling the setting while DMA is active has ZERO effect. None, nadda, not a shred of difference.
 
Old 02-05-2006, 03:10 PM   #2
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
Hmmmm you could set an higher readahead, it might help during big transferts ( hdparm -a 16384 ).

Also, you could set an higher DMA transfert mode (WARNING, BIG FAT WARNING : IT IS DANGEROUS, NOT RECOMMENDED AND EVIL! This might cause corruption, instability and various evilness, consider yourself warned), as your disk reports it is not using the best possible mode ( NB : there is probably a reason why it uses a slower mode, maybe you Mobo controller don't support any better!!!). In case you want to try (fool!) the command is : (hdparm -X udma3 ). Your drive reports to support from udma1 to udma5, but I suggest that you increase this step by step.

I doubt you will be able to get better than 15MB/sec with that drive...
It is possible that your motherboard don't support anything better than 20GB (no clue, but it seems strange to me... 20 GB is very small, at my opinion, you are safe if you don't go above ~120GB), however sometime a bios upgrade can fix this.
In the worst case, Linux will be able to see the drive (and that's for sure!) BUT if your Bios don't support the new drive, you will not be able to set DMA on it, so you will have horrible performance.

I hope this help

Last edited by Half_Elf; 02-05-2006 at 03:11 PM.
 
Old 02-05-2006, 11:48 PM   #3
drben
Member
 
Registered: May 2003
Location: Israel
Distribution: Ubuntu 5.10
Posts: 32

Original Poster
Rep: Reputation: 15
Thanks for the clues. I have a feeling that the mobo only supports udma 2, so I think I might give your evil ;-) advice on the dma settings a miss. cluck cluck. I'm a chicken.

Will have a go with the read-ahead setting.

I read somewhere that there are two types of IDE cable (40/80 somethings). is it possible that i have the wrong cable? and if so, how would I know?

thanks again
drben
 
Old 02-05-2006, 11:51 PM   #4
drben
Member
 
Registered: May 2003
Location: Israel
Distribution: Ubuntu 5.10
Posts: 32

Original Poster
Rep: Reputation: 15
From 13.9 to 18.2 ain't bad!

Thanks



ben@nutmeg:~$ sudo hdparm -a 16384 /dev/hda
Password:

/dev/hda:
setting fs readahead to 16384
readahead = 16384 (on)
ben@nutmeg:~$ sudo hdparm -tT /dev/hda

/dev/hda:
Timing cached reads: 540 MB in 2.00 seconds = 269.64 MB/sec
Timing buffered disk reads: 56 MB in 3.08 seconds = 18.20 MB/sec
 
Old 02-06-2006, 12:36 AM   #5
dmartins
Member
 
Registered: Oct 2005
Location: Ontario, Canada
Distribution: Arch, Gentoo
Posts: 98

Rep: Reputation: 15
I don't know the specs for your board but, the 80 wire IDE cables were introduced along with the ultra dma modes your hard drive is reporting. If i remember correctly a 80 wire cable is needed to run on udma modes above 2. The newer cables still have 40 pins so i guess they should work with older boards too, you just won't see any performance boost. I'm pretty sure the 80s let the board run the IDE at 133Mhz as well.

Have a look at this: http://www.mikeshardware.com/howtos/...ct_ide_hd.html

Last edited by dmartins; 02-06-2006 at 12:38 AM.
 
Old 02-06-2006, 08:01 AM   #6
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
I read somewhere that there are two types of IDE cable (40/80 somethings). is it possible that i have the wrong cable? and if so, how would I know?

Well, if you have old 40 pins cable, it will hurt preformance, however I really doubt that you do have some cable, unless you salvaged an old Pentium1 to build this computer. 40 pins cable aren't very common these days, you won't get anything at stores but 80 pins cables.
 
Old 02-06-2006, 08:47 AM   #7
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
I just had to add my two cents.

Quote:
Originally Posted by drben
I read somewhere that there are two types of IDE cable (40/80 somethings). is it possible that i have the wrong cable? and if so, how would I know?
The 80 wire IDE cables were created to address the problem of crosstalk between the data lines in the 40 wire cables. The 80 wire cables still only have 40 data lines. The difference is that on the 80 wire cables there is a ground wire between each pair of data wires. That prevents the electrical activity of any given wire from creating a false signal/noise on its neighbors through capacitative coupling. The 80 wire cables can be used on any IDE 40 pin connector. The benefits of the extra ground wires will help older IDE drives to some extent. It certainly won't hurt anything.
 
Old 02-06-2006, 11:46 AM   #8
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 63
Quote:
Originally Posted by drben
I am running the following drive off my 440BX mobo.
Model Number:ST320014A
Capacity:20 GB
Speed:5400 rpm
Seek time:12.7 ms avg
Interface:Ultra ATA/100

Kernel: 2.6.12-10-686
Distro: ubuntu 5.10 (hoary)
the system performance is a little bit lacklustre, so I started hunting for solutions. using hdparm -tT:
/dev/hda:
Timing cached reads: 500 MB in 2.01 seconds = 249.04 MB/sec
Timing buffered disk reads: 40 MB in 3.10 seconds = 12.91 MB/sec
My disk info:


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


Model=ST320014A, FwRev=3.07, SerialNo=5JZGTV1N
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=off
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=39102336
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: device does not report version:


I've tried a variety of maneuvers including turning on
dev/hda:
setting 32-bit IO_support flag to 2
IO_support = 2 (16-bit)

/dev/hda:
setting multcount to 16
multcount = 16 (on)
With no improvement. Likewise running on init 1 (to exclude a gnome-effect) and running via KDE/knoppix CD.

So - apart from investing some $ in a new disk is there anything else I can try, or am I stuck with a slowish disk?

If it is a matter of a better HDD, I've been told that the 440BX can only accept up to 20GB drives. is this true?

Ben


PS. I found this interesting information on http://www.linuxjournal.com/article/8317
For the drive size it should accept 32gb or that is what I had to jumper my drive at in my old BX board then when installing linux will see the extra capacity and allow you to use it or at least it did with my 40gb that I used in the machine. For the DMA you are probably getting all that you will from it my board was limited to DMA33 some BXs you can get support DMA66 but you will not get one supporting DMA100 unless you put in a separate controller card.
 
Old 02-06-2006, 11:47 AM   #9
drben
Member
 
Registered: May 2003
Location: Israel
Distribution: Ubuntu 5.10
Posts: 32

Original Poster
Rep: Reputation: 15
I guess I probably have 80 pin cables already, as I built this rig from a 2002AD vintage computer (pentium III, 440BX). If memory serves, I bought new IDE cables anyway a year ago when I thought a faulty cable was causing my HDD problem (it was the drive, hence the current cheap n slow replacement).

Still, I'm very happy ab the speed increase to >18MB/s. I will now have to work out how to make the change permenant - unless someone on this forum feels like making my life easy and just telling me.

viva linuxquestions - excellent help. thank you.

Ben
 
Old 02-06-2006, 12:00 PM   #10
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
hdparm isn't a good benchmark for overall performance. making the readahead that high will hurt random disk access. making your readahead 2 megs max out your hdparm results.
adding a line to your startup scripts such as
hdparm -a 2048 /dev/hda
will do what you want.
 
Old 02-06-2006, 04:10 PM   #11
palceksmuk
LQ Newbie
 
Registered: Dec 2005
Distribution: slackware 10.2
Posts: 26

Rep: Reputation: 15
I think that this readahead works only when reading bigger files. Did you see that your applications are working faster?
I'll try setting this to 2mb too.
 
Old 02-06-2006, 04:53 PM   #12
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 63
Quote:
Originally Posted by drben
Still, I'm very happy ab the speed increase to >18MB/s. I will now have to work out how to make the change permenant - unless someone on this forum feels like making my life easy and just telling me.

viva linuxquestions - excellent help. thank you.

Ben
Edit the file /etc/hdparm.conf and use the options/examples in there to enable the mode(s) you want at startup.
 
Old 02-07-2006, 01:39 AM   #13
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
i think when i was deciding what hard drive parameters to use, I made a script, something like
dd if=/dev/zero of=/tmp/2gigfile bs=1024 count=2000
for i in 128 256 512 1024 2048 4096; do
hdparm -a$i /dev/hda
time tar clf - /opt > /tmp/opt.tar
time cp /tmp/2gigfile /tmp/2gigfile.copy
done
rm /tmp/2gigfile /tmp/2gigfile.copy /tmp/opt.tar

if you have 4 gigs of ram, this is a useless test. anyway, you can probably see the differences that the settings make with big and small files. if your opt dir is smaller than a gig, pick something else.
 
Old 02-07-2006, 11:51 AM   #14
drben
Member
 
Registered: May 2003
Location: Israel
Distribution: Ubuntu 5.10
Posts: 32

Original Poster
Rep: Reputation: 15
output from whansard's script

Again - without wishing to kiss too much a** can I say thanks again for all the helpful replies.

Here's the output from the script - i don't know how to interpret , I'm afraid:
Code:
ben@nutmeg:~/scripts$ sudo ./testHD
2000+0 records in
2000+0 records out
2048000 bytes transferred in 0.057679 seconds (35506890 bytes/sec)

/dev/hda:
 setting fs readahead to 128
 readahead    = 128 (on)
readahead speed 128
tar: Removing leading `/' from member names

real    0m0.064s
user    0m0.006s
sys     0m0.020s

real    0m0.085s
user    0m0.003s
sys     0m0.045s

/dev/hda:
 setting fs readahead to 256
 readahead    = 256 (on)
readahead speed 256
tar: Removing leading `/' from member names

real    0m0.063s
user    0m0.006s
sys     0m0.018s

real    0m0.086s
user    0m0.002s
sys     0m0.045s

/dev/hda:
 setting fs readahead to 512
 readahead    = 512 (on)
readahead speed 512
tar: Removing leading `/' from member names

real    0m0.061s
user    0m0.006s
sys     0m0.017s

real    0m0.084s
user    0m0.004s
sys     0m0.043s

/dev/hda:
 setting fs readahead to 1024
 readahead    = 1024 (on)
readahead speed 1024
tar: Removing leading `/' from member names

real    0m0.063s
user    0m0.008s
sys     0m0.017s

real    0m0.085s
user    0m0.003s
sys     0m0.044s

/dev/hda:
 setting fs readahead to 2048
 readahead    = 2048 (on)
readahead speed 2048
tar: Removing leading `/' from member names

real    0m0.063s
user    0m0.008s
sys     0m0.015s

real    0m0.086s
user    0m0.006s
sys     0m0.042s

/dev/hda:
 setting fs readahead to 4096
 readahead    = 4096 (on)
readahead speed 4096
tar: Removing leading `/' from member names

real    0m0.062s
user    0m0.006s
sys     0m0.017s

real    0m0.085s
user    0m0.004s
sys     0m0.043s
 
Old 02-07-2006, 02:19 PM   #15
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
There are two factors of a hard drive. One is throughput. The other is accessing time. For Linux, any hard drive with the lowest accessing time will be better. Since your hard drive has close to 13 milliseconds, no wonder it is slow.

By using Linux, the capacity limit of the BIOS is irrelvant. If the kernel has large block support enabled, Linux can provide a few terabyte limit capacity even though the BIOS has a 32 GB limit. However the first partition have to be within limits of the BIOS limit capacity which should be hard because usually /boot is there.

The results say using readahead of 512 will give you a little bit of performance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I improve gnome performance? pfaendtner Linux - Software 16 04-14-2005 11:52 AM
Is there a way to improve java performance? jeffreybluml Linux - Newbie 1 07-10-2004 04:08 AM
How to Improve performance of PC Imran Aziz Linux - Software 3 06-03-2004 02:10 PM
How to REALLY improve linux performance? tradingbr Linux - General 7 05-01-2004 11:38 AM
ways to improve performance flipboi Linux - Newbie 6 10-25-2003 11:22 AM


All times are GMT -5. The time now is 07:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration