Click to See Complete Forum and Search --> : HDD Tweak # 2
Ahimsa
07-03-2002, 11:30 AM
Greetings
A couple of weeks back I was enquiring about speeding up the throughput of my hda1. Several people were good enough to respond with input.
And at the risk of flogging a dead horse ... :)
I have since changed my HDD to an 8.4, but still get very little in the way of a throughput increase when I use the hdparm tweaks as suggested on the O'Reilly site and by FancyPiper here. I still seem to get stuck at 4.8x MB/sec. I acknowledge with 40-pin ribbons that might be causing/contributing to the drag, but was wondering if there were any other fixes that I could apply. Specifically, I am wanting to see if changing the throughput would increase the rate at which my monitor repaints (sometimes the image of a window that I've just closed obscures the document underneath, or my amor creature will leave a trail as it 'falls' from one window to another, etc.), as well as the opening speed of the various programs.
If someone can point me to some relevant docs, or share some tips I'd be appreciative.
My specs are:
RH7.2, epox ep-mvp3m mobo, AMD K6-2 450MHz proc, i586, VGA RIVA TNT2 (32MB DRAM), and the system draws from 196MB RAM/core.
I have included a script giving all the relevant details. Many thanks.
[root@localhost root]# hdparm ls /proc/ide
drivers hda hdd ide0 ide1 via
[root@localhost root]# uname -a
Linux localhost.localdomain 2.4.7-10 #1 Thu Sep 6 17:21:28 EDT 2001 i586 unknown
[root@localhost root]# cat /proc/ide/drivers
ide-cdrom version 4.59
ide-floppy version 0.97
ide-disk version 1.10
[root@localhost root]# cat /proc/ide/via
----------VIA BusMastering IDE Configuration----------------
Driver Version: 3.23
South Bridge: VIA vt82c686a
Revision: ISA 0x1b IDE 0x6
Highest DMA rate: UDMA66
BM-DMA base: 0xd000
PCI clock: 33MHz
Master Read Cycle IRDY: 1ws
Master Write Cycle IRDY: 1ws
BM IDE Status Register Read Retry: yes
Max DRDY Pulse Width: No limit
-----------------------Primary IDE-------Secondary IDE------
Read DMA FIFO flush: yes yes
End Sector FIFO flush: no no
Prefetch Buffer: no no
Post Write Buffer: no no
Enabled: yes yes
Simplex only: no no
Cable Type: 40w 40w
-------------------drive0----drive1----drive2----drive3-----
Transfer Mode: UDMA PIO PIO DMA
Address Setup: 30ns 120ns 120ns 30ns
Cmd Active: 90ns 90ns 90ns 90ns
Cmd Recovery: 30ns 30ns 30ns 30ns
Data Active: 90ns 330ns 330ns 90ns
Data Recovery: 30ns 270ns 270ns 30ns
Cycle Time: 60ns 600ns 600ns 120ns
Transfer Rate: 33.0MB/s 3.3MB/s 3.3MB/s 16.5MB/s
[root@localhost root]# hdparm /dev/hda
/dev/hda:
multcount = 32 (on)
I/O support = 3 (32-bit w/sync)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 1 (on)
nowerr = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 1048/255/63, sectors = 16841664, start = 0
[root@localhost root]# hdparm -Tt /dev/hda
/dev/hda:
Timing buffer-cache reads: 128 MB in 3.15 seconds = 40.63 MB/sec
Timing buffered disk reads: 64 MB in 7.38 seconds = 8.67 MB/sec
[root@localhost root]# hdparm -Tt /dev/hda
/dev/hda:
Timing buffer-cache reads: 128 MB in 3.13 seconds = 40.89 MB/sec
Timing buffered disk reads: 64 MB in 13.16 seconds = 4.86 MB/sec
r0nster
07-03-2002, 11:55 AM
You have UDMA enabled in your BIOS? Your settings look correct to me but double-check your bios settings. Also, you might want to exchange that 40 wire ribbon with an 80 wire. Even if the drive isn't UDMA 66, you can benefit from an 80 wire ribbon. They still have the same connector as before. Here is my setup
cat /proc/ide/via
----------VIA BusMastering IDE Configuration----------------
Driver Version: 3.34
South Bridge: VIA vt82c686a
Revision: ISA 0x22 IDE 0x10
Highest DMA rate: UDMA66
BM-DMA base: 0xd000
PCI clock: 33.3MHz
Master Read Cycle IRDY: 0ws
Master Write Cycle IRDY: 0ws
BM IDE Status Register Read Retry: yes
Max DRDY Pulse Width: No limit
-----------------------Primary IDE-------Secondary IDE------
Read DMA FIFO flush: yes yes
End Sector FIFO flush: no no
Prefetch Buffer: no no
Post Write Buffer: no no
Enabled: yes yes
Simplex only: no no
Cable Type: 80w 40w
-------------------drive0----drive1----drive2----drive3-----
Transfer Mode: UDMA UDMA UDMA DMA
Address Setup: 30ns 30ns 30ns 30ns
Cmd Active: 90ns 90ns 90ns 90ns
Cmd Recovery: 30ns 30ns 30ns 30ns
Data Active: 90ns 90ns 90ns 90ns
Data Recovery: 30ns 30ns 30ns 30ns
Cycle Time: 30ns 30ns 60ns 120ns
Transfer Rate: 66.6MB/s 66.6MB/s 33.3MB/s 16.6MB/s
output from hdparm:
root@psychadelie portage # hdparm -i /dev/hdb
/dev/hdb:
Model=MAXTOR 6L040J2, FwRev=A93.0500, SerialNo=362200629000
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=78177792
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 udma0 udma1 udma2 udma3 *udma4 udma5 udma6
AdvancedPM=no WriteCache=enabled
Drive Supports : ATA/ATAPI-5 T13 1321D revision 1 : ATA-1 ATA-2 ATA-3 ATA-4 ATA-5
For future reference, udma6 is UDMA133. You will be seeing this more on drives in the future. Also, when you post your specs, put them inside the "code" tags. :)
Ahimsa
07-03-2002, 03:15 PM
r0nster
Good of you to reply - thax for sharing your specs with me. I'll look into the 80 pin ribbon - but then what does one do with the 40 pin connector? You say that the 40 and the 80 have the same connector - how does that work? Sorry if that's a dumb question.
I will check my BIOS settings next time I boot up (which with a Linux is a rarity, not like Win, so it's kind of nice not to have to keep rebooting :) ).
Thanks for the tip re the code tags. Would that be the '#' option on the vB Code?
Cheers
The Whizzard
07-03-2002, 03:33 PM
You say that the 40 and the 80 have the same connector - how does that work? The 80 conductor cable is the same as a 40 pin cable except the 80 conductor cable has 40 grounds between each active conductor. The extra grounding cuts down on cross-talk providing better performance(even for non ATA66/100/133 devices).
The Whizzard
07-03-2002, 03:53 PM
I have since changed my HDD to an 8.4, but still get very little in the way of a throughput increase when I use the hdparm tweaks as suggested on the O'Reilly site and by FancyPiper here. I still seem to get stuck at 4.8x MB/sec. You probably will not get better performance on any IDE hard below the capacity of about 10Gb. It's simply that they are several years old and not as good as newer drive.
Some things to look for when getting a devent hard drive are:
1. RPM speed --- Cheap drives are 5400 RPM while higher performance are 7200 RPM and higher.
2. Manufacturer --- I feel Seagate and Maxtor have better performance and are manufactured to a better standard than IBM, Western Digital, Fujistu and a few others.
3. Interface --- Anything below ATA66 is pretty much useless for a decent system. Be careful though, many of the first generation ATA66 drives are several years old and don't provide decent throughput.
Ahimsa
07-03-2002, 04:01 PM
Originally posted by r0nster
You have UDMA enabled in your BIOS?
r0nster
Pursuant to your suggestion that I check my BIOS settings for the UDMA - the only reference to UDMA was in the section "Integrated Peripherals" and is mentioned in connection with the following:
IDE Primary Master UDMA/Slave UDMA
IDE Secondary Master UDMA/Slave UDMA
The default is "Auto" and the other option is "Disabled". I have the settings enabled.
Ahimsa
07-03-2002, 04:05 PM
Thanks for the tips Whizzard - I'll keep that in mind next time I'm shopping for a harddrive - which with my present finances isn't going to be for a few months at least :(
Timothy L. Miller
07-05-2002, 12:10 AM
What mode does your bios show your hard drive supports. It should say something along the lines of PIO mode #, DMA# or ATA#. I can't remember the exact things, but I THINK that ATA(or DMA)1=IDE, ATA2=EIDE, ATA3=ATA/33, ATA4=ATA/66, ATA5=ATA/100. PIO Mode 4 I think is about equal to ATA/33 also. This would give you a general idea of the best you will be able to expect from the drive given an ideal situation. Also, what else you have on the same channel? If you have a slower performing drive on the same channel (such as a cdrom), then it will pull the performance of your hard drive down.
Ahimsa
07-06-2002, 05:29 PM
Timothy L. Miller
Thanks for your thoughts on the HDD tweak query of mine. As far as I can tell, my BIOS reports a PIO mode #4 an ATA/33 didn't you say. Also, as far as I can make out (a lot of this stuff is still very much a foreign language to me) I don't have any other hardware connected such as a CD-ROM on that channel. I was thinking of possibly going for the 80-pin ribbons, and then take The Whizzard's advice when next shopping for a HDD.
Timothy L. Miller
07-07-2002, 01:46 AM
The 80 pin ribbon should help out some. One other thing to check, if your hard drive supports LBA (logical/large (I've heard it described as both) block addressing), do you have it enabled? Although considering the size, I rather doubt it would be LBA...still, worth a check. I really have no idea how to check to see if a hard drive supports it other than actually looking at it. Anyone else know?
Ahimsa
07-07-2002, 04:55 AM
Originally posted by Timothy L. Miller
I really have no idea how to check to see if a hard drive supports it other than actually looking at it. Anyone else know?
T.L.M. - are youmeaning actually taking it out and physically eyeballing it? I could do that - in fact I did when I switched drives with the old one - and I made some notes on what I could read off the label, so if you could give me an idea I should still have those notes.
bastard23
07-08-2002, 11:40 PM
For LBA, which is logical, use hdparm -I <device> and check Capabilities: (capital i)
It almost has to support LBA, BIOS weirdness if I remember. 8MB/s doesn't sound too bad (or great) for an 8.4 Gig. Once do the identify w/ hdparm you can find the model number. I know seagate and fujitsu keeps all of their specs online. Check for the media thourghput to see what the transfer rate you should be getting.
Also PIO4 (Programmed Input/Output) is older than UDMA/33 and really shouldn't be used on any new hardware. It's dreadfully slow and wasteful on a modern machine and OS. FYI it is "equivalent" in speed as mdma (mw dma, Multi-word Direct Memory Access)
Another thing, a 80pin cable probably won't help. Well, it might and it won't hurt either. UDMA/33 just needs a good 40 pin cable. Hopefully you'll get a 80pin cable w/ you new HD.
Have fun,
chris
fancypiper
07-09-2002, 12:01 AM
This tweak should be done in linux single only as it can corrupt some filesystems if your mobo/hardware doesn't support it! Use the 80 conductor ribbon to get these to work, especially the udma.
One other big option is the enabling of UDMA 33/66/100. Add the -X option, and then this number i.e. (-X 69)
-X 33 ====> Multiword DMA
-X 66 ====> ATA-33 (UDMA2)
-X 68 ====> ATA-66 (UDMA4)
-X 69 ====> ATA-100 (UDMA 5)
For your trials, do:
hdparm -T -t /dev/hd{a,a,a,a,} and it will perform the test 4 times.
From the hdparm info:
-T Perform timings of cache reads for benchmark and comparison purposes. For meaningful results, this operation should be repeated 2-3 times on an other_ wise inactive system (no other active processes) 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 indication of the throughput of the processor, cache, and memory of the system under test. If the -t flag is also specified, then a correction factor based on the outcome of -T will be incorporated into the result reported for the -t operation.
-t Perform timings of device reads for benchmark and comparison purposes. For meaningful results, this operation should be repeated 2-3 times on an other_ wise inactive system (no other active processes) with at least a couple of megabytes of free memory. This displays the speed of reading through the buffer cache to the disk without any prior caching of data. This measurement is an indication of how fast the drive can sustain sequential data reads under Linux, without any filesystem overhead. To ensure accurate measurments, the buffer cache is flushed during the processing of -t using the BLK_ FLSBUF ioctl. If the -T flag is also specified, then a correction factor based on the outcome of -T will be incorporated into the result reported for the -t operation.
Ahimsa
07-09-2002, 03:41 AM
bastard23 and fancypiper
Thank you both for your considered replies. It will take a bit for me to digest your input so I've saved your replies and will work through them shortly. Just wanted to say thanks for your trouble and help :D