LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-22-2003, 02:27 PM   #1
schbond
Member
 
Registered: May 2002
Distribution: Gentoo
Posts: 54

Rep: Reputation: 15
idebus settings, new kernel


Hi. I just compiled my own 2.4.21 kernel. Everything is fine, except that when I read/write (especially write) to the hard drive, my system becomes bogged. I can barely move the mouse across the screen.

During kernel boot, I see:

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

I know for a fact my hard drive is 100MHz and my motherboard supports at least 100, if not 133MHz. I am not sure about my IDE cables. With other kernels, my hard drive ran smoothly. I could even navigate GUI while compiling, writing to HD, etc. This makes me suspect that my cables are also 100MHz, and that the setting is in the kernel.

# hdparm -Tt /dev/hda

/dev/hda:
Timing buffer-cache reads: 128 MB in 0.42 seconds =304.76 MB/sec
Timing buffered disk reads: 64 MB in 21.47 seconds = 2.98 MB/sec

I have two IBM 60 GB Desktar 7200rpm HDDs. They are both sharing the secondary IDE bus, so theoretically, performance settings should be same for both:

# hdparm -i /dev/hdb

/dev/hdb:

Model=IC35L060AVVA07-0, FwRev=VA3OA50K, SerialNo=VNC300A3C18KLA
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=52
BuffType=DualPortCache, BuffSize=1863kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=120103200
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-5 T13 1321D revision 1: 2 3 4 5

Please help me regain my hard drive speed. I don't want to tweak anything without knowing what it does. (running Slackware 9.0). Thanks.
 
Old 07-22-2003, 05:48 PM   #2
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
ATA100 and ATA133 doesn't mean 100 MHz or 133 MHz. They are just burst rates in megabytes. Very rarely hard drives will come close to the burst rates.

idebus is the PCI bus. If your PCI bus can handle 66 MHz or 100 MHz. Then you can set it.

What does

hdparm -abcdmu /dev/hda
hdparm -abcdmu /dev/hdb

come up with.
 
Old 07-22-2003, 05:58 PM   #3
psyno
LQ Newbie
 
Registered: Jul 2003
Posts: 23

Rep: Reputation: 15
Well I'm extremely new to Linux, but from a Windows background I'd say it sounds like you're using PIO to read/write instead of DMA or UDMA. PIO is of course extremely slow for any modern hard drive.

Check the BIOS to make sure UDMA is enabled...I couldn't begin to tell you where to check in linux...

Good luck.
 
Old 07-23-2003, 02:40 PM   #4
schbond
Member
 
Registered: May 2002
Distribution: Gentoo
Posts: 54

Original Poster
Rep: Reputation: 15
Thanks for the quick respones, guys.

Electro, "hdparm -abcdmu" (for both /dev/hda and /dev/hdb) returns:

multcount = 16 (on)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off) ***
readahead = 8 (on)
busstate = 1 (on)

*** This makes me think I could just set kernel argument idebus=100, but I don't know if that's the max my system supports. I have checked my motherboard (Soyo SY-K7V Dragon Plus) manual, and I can't find anything about DMA - damn thing doesn't have an index. So I will keep searching. However, I would like to note that before (prior to compiling kernel, and on other distros) I would have transfer speeds (both on LAN and on local HD transfers) in excess of 100 and 200 MB/s. Now I can't seem to exceed 2.7 MB/s. This is a bit of a pain as I have over 11 GB of data backed up on my LAN.

Psyno, the only DMA-related option in my CMOS was this menu:

Primary Master PIO [Options: Mode 0, Mode 1, Mode 2, Mode 3, Mode 4, Auto]
Primary Slave PIO [Options: Mode 0, Mode 1, Mode 2, Mode 3, Mode 4, Auto]
Secondary Master PIO [Options: Mode 0, Mode 1, Mode 2, Mode 3, Mode 4, Auto]
Secondary Slave PIO [Options: Mode 0, Mode 1, Mode 2, Mode 3, Mode 4, Auto]
Primary Master UDMA [Options: Auto, Disabled]
Primary Slave UDMA [Options: Auto, Disabled]
Secondary Master UDMA [Options: Auto, Disabled]
Secondary Slave UDMA [Options: Auto, Disabled]

All the PIO's and UDMA's were set to Auto. If it helps, I have a Windows XP partition, I could check settings in there (as you said you are comfortable with Windows). Thanks.
 
Old 07-24-2003, 02:02 PM   #5
schbond
Member
 
Registered: May 2002
Distribution: Gentoo
Posts: 54

Original Poster
Rep: Reputation: 15
HDIO_SET_DMA

I was trying to install Xine with DVD playback support, and the Xine website (http://xine.sourceforge.net) recommended that I turn DMA on my DVD drive.

# hdparm -d 1 /dev/hdc

/dev/hdc:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)

what is HDIO_SET_DMA? Is this related to my idebus settings?
 
Old 07-24-2003, 06:02 PM   #6
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
If you have PCI-X that can run from 33 MHz to 100 MHz, then you can change it. Your motherboard is the standard PCI or 33 MHz. The PCI bus max out at 133 megabytes per second, so you can not achive more than 133 megabytes. You can add ide0=ata66 to your boot loader. This is dangerous if you don't know what you are doing. The 0 in ide is the device channel of your controller, so to set your secondary channel to ata66 you specify ide1.

At the console type
hdparm -X68 -d1 -c3 -k1 /dev/hda
hdparm -X68 -d1 -c3 -k1 /dev/hdb

Then see how that works. The -X68 is for UDMA 4 and it is supported by many IDE chipsets. You can use -X69 for UDMA 5 but you may run in the chance of freezing your computer. If everything works properly, you can add a few lines to your running scripts.

Your DVD drive could be using IDE-SCSI module so hdparm will not work. If you remove that module and run hdparm again. DMA should be enable for your drive.

You may need to recompile the kernel to support DMA.
 
Old 07-25-2003, 02:53 AM   #7
schbond
Member
 
Registered: May 2002
Distribution: Gentoo
Posts: 54

Original Poster
Rep: Reputation: 15
hdparm -X68 -d1 -c3 -k1 for both /dev/hda and /dev/hdb produces:

setting 32-bit IO_support flag to 3
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
setting keep_settings to 1 (on)
setting xfermode to 68 (UltraDMA mode4)
HDIO_DRIVE_CMD(setxfermode) failed: Input/output error
IO_support = 3 (32-bit w/sync)
using_dma = 0 (off)
keepsettings = 1 (on)

I also tried adding "ide0=ata100" to /etc/lilo.conf, but when I ran /sbin/lilo :

Warning: LBA32 addressing assumed
Unrecognized token "ide0" at or above line 36 in file '/etc/lilo.conf'

I double-checked, and I have DMA and EIDE compiled in my 2.4.21 kernel.
 
Old 07-25-2003, 02:56 PM   #8
schbond
Member
 
Registered: May 2002
Distribution: Gentoo
Posts: 54

Original Poster
Rep: Reputation: 15
problem solved

I have been reading that people using the 2.4.21 kernel are having problems with DMA/ATA settings. I compiled a 2.4.20 kernel, and DMA works now. I can onced again multi-task. Thanks all for the suggestions.

P.S. No more boot errors with kernel, too!
 
Old 07-25-2003, 04:16 PM   #9
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
After searching this forum. I found http://www.linuxquestions.org/questi...threadid=72226
Scroll to the bottom post.

For linux drives, you may want to set them to LBA in the BIOS instead of AUTO. Also you can specify lba32 in lilo configuration file.

The ide0=ata66 should be placed in the append line of lilo.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
IDEbus issue RBJohns Linux - Laptop and Netbook 5 04-22-2005 02:21 PM
idebus=xx speed change podollb Linux - Software 1 03-21-2004 12:04 PM
assuming Idebus=33MHz linux_pioneer Linux - General 4 12-28-2003 07:31 PM
how to fix idebus=xx (properly) Spislander Debian 1 10-17-2003 09:21 AM
Faster RedHat with idebus tjm Linux - General 1 11-12-2002 09:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:24 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