LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-09-2004, 01:42 PM   #1
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Rep: Reputation: 30
hd speed problems


I've been having this problem ever since I installed Debian GNU/Linux with my hard drives. Every time I transfer file between partition (or between hds), which is quite often, I get this huge lag and the computer becomes unusable during the transfer.

So I started searching these forums for a solution. I came accross this thread: http://www.linuxquestions.org/questi...threadid=75181 which suggested I should run the following command:
Code:
hdparm -c 1 -d 1 -k 1 /dev/hdx
Which I did. And it even showed some results, although they were not acceptable yet. Here's what I've got so far:

120GB Western Digital ATA100 8MB buffer 7,2k rpm. It's about 1 years old, perhaps a little more.
Before "hdparm -c 1 -d 1 -k 1 /dev/hda":
Code:
[14:59 root@atheisticfaith anti]# hdparm -t /dev/hda

/dev/hda:
 Timing buffered disk reads:   10 MB in  3.50 seconds =   2.86 MB/sec
While issuing the "hdparm -c 1 -d 1 -k 1 /dev/hda" command I got this output:
Code:
[14:59 root@atheisticfaith anti]# hdparm -c 1 -d 1 -k 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
 setting keep_settings to 1 (on)
 IO_support   =  1 (32-bit)
 using_dma    =  0 (off)
 keepsettings =  1 (on)
This is not too cool, right? What can I do to fix this?
And after this command, I got almost double the results, even though it didn't work completely:
Code:
[15:03 root@atheisticfaith anti]# hdparm -t /dev/hda

/dev/hda:
 Timing buffered disk reads:   18 MB in  3.26 seconds =   5.53 MB/sec
I understand this is still not acceptable for an ide hd. Here's the specifications from "hdparm -i /dev/hda":
Code:
[17:49 root@atheisticfaith anti]# hdparm -i /dev/hda

/dev/hda:

 Model=WDC WD1200JB-00CRA1, FwRev=17.07W17, SerialNo=WD-WMA8C2949898
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=234441648
 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 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: device does not report version: 

 * signifies the current active mode
Here are the results from my other hd. A 40GB ATA100 hd before "hdparm -c 1 -d 1 -k 1 /dev/hdb" command:
Code:
[15:07 root@atheisticfaith anti]# hdparm -t /dev/hdb
After:

/dev/hdb:
 Timing buffered disk reads:   10 MB in  3.12 seconds =   3.20 MB/sec
And as I try to run "hdparm -c 1 -d 1 -k 1 /dev/hdb" I still get exactly the same error. But the results are still far better (although not yet acceptable):
Code:
[15:13 root@atheisticfaith anti]# hdparm -t /dev/hdb

/dev/hdb:
 Timing buffered disk reads:   16 MB in  3.07 seconds =   5.22 MB/sec
Here's the "hdparm -i /dev/hdb":
Code:
[18:43 root@atheisticfaith anti]# hdparm -i /dev/hdb

/dev/hdb:

 Model=WDC WD400BB-00AUA1, FwRev=18.20D18, SerialNo=WD-WMA6R2567113
 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=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78165360
 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 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: device does not report version: 

 * signifies the current active mode
This tells us that both of the disks are capable of dma but still won't let it run. Any help, suggestions or comments will be greatly appreciated. I'm not sure what other information to include, so just tell me if there's any information you think might help with the solution of this and I'll post it here.
 
Old 06-09-2004, 03:12 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
You need to compile DMA support into your kernel. In the "ATA/ATAPI/MFM/RLL support" section you will want to enable "Generic PCI bus-master DMA support" and "Use PCI DMA by default when available"
 
Old 06-09-2004, 03:18 PM   #3
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Thanks for the reply.

Unfortunately, though. I already compiled it in my 2.6.5 kernel. Here's the relevant part of my kernel config:
Code:
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
# CONFIG_BLK_DEV_CMD640 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=y
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
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_ADMA=y
Anything else that comes to mind?
 
Old 06-09-2004, 03:42 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I was reading /usr/src/linux/Documentation/ide.txt and it seems that sometimes old/crusty ide cables can pooch your DMA, maybe this....otherwise maybe flaky hardware.

It doesn't make much sense that you cannot enable DMA if you have those options in your kernel.
 
Old 06-09-2004, 05:39 PM   #5
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Hmm, I see. Well. Good thing I'm expecting a pair of new, longer (for better organization inside my box) IDE cables in the mail tomorrow. Along with a new 250GB hd. I guess I'll find out then if that's the case. I'll post here once I figure it out. Thanks for the reply, it was very helpful. I'll give it a rest untill tomorrow then, I guess.
 
Old 06-10-2004, 09:41 AM   #6
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
I recompiled my kernel on the fly to mess with framebuffer support, and well...
Code:
[14:40 root@atheisticfaith anti]# hdparm -Tt /dev/hda ; hdparm -Tt /dev/hdb

/dev/hda:
 Timing buffer-cache reads:   736 MB in  2.14 seconds = 343.18 MB/sec
I r Timing buffered disk reads:  e 76 MB in  3.05 seconds =  24.92 MB/sec

/dev/hdb:
I recom Timing buffer-cache reads:   asd828 MB in  2.00 seconds = 413.86 MB/sec
 Timing buffered disk reads:   76 MB in  3.04 seconds =  24.97 MB/sec
I don't know what I did to enable DMA but it was probably something very silly. o_O

Anyways. Now I'm in the trouble of having to run "hdparm -c 1 -d 1 -k 1 /dev/hdx" every time I reboot.
 
Old 06-10-2004, 12:54 PM   #7
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Usually you can put commands like that in /etc/rc.local and they will be run last thing before your login prompt.
 
Old 06-10-2004, 01:29 PM   #8
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Thanks. I got this script from another thread and it seems to work.

Code:
#!/bin/sh

# Speed up harddisk by issuing hdparm commands

echo "Speed up harddisk"
/sbin/hdparm -c 1 -d 1 -k 1 /dev/hda
/sbin/hdparm -c 1 -d 1 -k 1 /dev/hdb
I'm keeping it in /etc/rc3.d/S01hdspeedsetup. Should I put it in /etc/rc.local rather?
 
Old 06-10-2004, 01:47 PM   #9
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
No, keep the rc script. It is more elegant to have it as an actual rc script. I wasn't sure about debians rc script format (It varies between distros) so I wasn't sure how to explain to do it properly.

rc.local is just a 'hack' to get certain commands to run at boot without doing a full-on rc script.

Last edited by bulliver; 06-10-2004 at 01:48 PM.
 
Old 06-10-2004, 02:34 PM   #10
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Ah, I see. Well, thanks for the information.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
suse and speed problems delos SUSE / openSUSE 3 11-08-2005 04:18 PM
2 Problems (speed- and internet) IanGlenn Linux - Software 3 11-15-2004 09:59 AM
Fluxbox 0.9.9 speed problems LavaDevil94 Linux - Software 0 08-02-2004 05:07 PM
Speed problems .... muhv Linux - Newbie 0 10-06-2003 04:57 AM
ProFTPD speed problems Astro Slackware 1 08-26-2003 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:22 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration