View previous topic :: View next topic |
Author |
Message |
Nick W l33t
Joined: 07 Dec 2003 Posts: 684
|
Posted: Tue Dec 09, 2003 8:11 pm Post subject: Gentoo Seems Slow - Reiserfs or Kernel to Blame? |
|
|
Hi everyone,
The good news is.... I'm typing from opera in KDE - Hoorah!
The bad new is... Gentoo seems a bit slow. I'm unpacking a very large tar archive of my fedora home dir and it's taking up ALL cpu (almost) and is very slow compared to when I tested it before ditching Fedora...
Could it be that I chose Reiserfs as my filesystem?
or perhaps that I have the wrong chipsets enabled in the kernel? - I have a Asus A7N8X-X board and did not know what chipsets to enable so went with the defaults when compiling..
Is there anything else that might make the system sluggish?
Thoughts greatly appreciated, I've had so much fun building Gentoo, I just need to tune it now
Added: It took 24secs to 'cp -R' a 73MB directory!
Nick |
|
Back to top |
|
|
neenee Veteran
Joined: 20 Jul 2003 Posts: 1786
|
Posted: Tue Dec 09, 2003 8:42 pm Post subject: |
|
|
try enabling dma; as root: hdparm -d1 /dev/hda |
|
Back to top |
|
|
Nick W l33t
Joined: 07 Dec 2003 Posts: 684
|
Posted: Tue Dec 09, 2003 8:44 pm Post subject: |
|
|
Yes, I forgot. It tells me that my hard drives are not dma'ing on boot up. I looked all through the bios and got zilch...
Will that fix the dma permenantly?
Thanks very much
Nick |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Tue Dec 09, 2003 8:44 pm Post subject: |
|
|
its unlikely to be the filesystem causing that slowness.
the immediate thing that comes to mind is DMA. when DMA is turned on for your hard disks, the transfer rates are much increased and the CPU usage is much decreased.
on sane setups, the kernel will attempt to turn DMA on for hard disks, but it might not be able to. you need to have support compiled in for your IDE controller.
try this as root:
that will tell you if DMA is on or not.
"hdparm -d1 /dev/hda" will attempt to turn on IDE for that disk.
also, do :
Code: | hdparm -Tt /dev/hda |
for future reference.
as for IDE controller, you probably want the AMD/nVidia support, as your board is a nforce2 board i think.
as root:
lspci is part of the pciutils package.
on my nforce2 system, i get:
Code: | 00:09.0 IDE interface: nVidia Corporation nForce2 IDE (rev a2) |
if so, you need to enable "AMD and nVidia support" in your kernel, under ATA/IDE support. _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
Nick W l33t
Joined: 07 Dec 2003 Posts: 684
|
Posted: Tue Dec 09, 2003 8:50 pm Post subject: |
|
|
Alrrrrright!
Now it's copying the dir in 6 secs
I have seagate 'ultra dmas' - is that the same thing, is dma just on or off - no settings?
Also, if I turn on the amd/nvidia (which i never saw but sure is there) can I turn off all the others to get a tighter kernel?
Cheers
Nick |
|
Back to top |
|
|
rommel Veteran
Joined: 19 Apr 2002 Posts: 1145 Location: Williamsburg Virginia
|
Posted: Tue Dec 09, 2003 11:57 pm Post subject: |
|
|
did you add support in your kernel for the ide chipset?.... you shouldnt have to enable dma if you did... this is what you want enabled nder the ata/ide section Code: | <*> AMD and nVidia IDE support |
|
|
Back to top |
|
|
dudds n00b
Joined: 03 Dec 2003 Posts: 28
|
Posted: Wed Dec 10, 2003 12:57 am Post subject: |
|
|
Hi dsd,
It turns out that I don't have dma enabled on my system either. When I enter the following command:
dsd wrote: |
as root:
lspci is part of the pciutils package.
|
I get the following line:
00:1f.1 IDE interface: Intel Corp. 82801EB Ultra ATA Storage Controller (rev 02)
If I then do a make menuconfig and look through all the options I can't seem to find anything that resembles the above. Do you have any suggestions??
Also I see an option "enable DMA only for disks" should this option be selected or not?? in my case it isn't.
catch ya,
Dave |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Wed Dec 10, 2003 8:40 pm Post subject: |
|
|
that one is slightly trickier.
indeed there is no obvious menu option.
i can confirm that its this one though:
Code: | < > Intel PIIXn chipsets support |
if you are interested in how i found that..
Code: |
cd /usr/src/linux
grep -i -R "82801EB" *
|
you will notice quite a few matches in drivers/ide/pci/piix.c
nick: yes, its safe to turn off some others.
these are the ones, on by default in 2.6, that i turn off manually :
Code: | [ ] CMD640 chipset bugfix/support
[ ] Generic PCI IDE Chipset Support
< > RZ1000 chipset bugfix/support
< > Intel PIIXn chipsets support |
hope this helps, _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
Delirium n00b
Joined: 04 Jan 2003 Posts: 29 Location: Brisbane
|
Posted: Tue Apr 20, 2004 11:17 pm Post subject: Toshiba 2510CDS |
|
|
I also have the problem of unused DMA for my hard drive. This is unfortunately on a Toshiba laptop. I am unsure what the chipset is and can't find any info on the net for it.
The model is a Satellite 2510CDS and the lspci output is as such:
00:10.0 IDE interface: Toshiba America Info Systems: Unknown device 0102 (rev 33)
I'm also having problems with the sound card and I have a suspicion that it is the irq settings in bios that are tripping up the system. Any solutions would be much appreciated!
Last edited by Delirium on Wed Apr 21, 2004 2:53 am; edited 1 time in total |
|
Back to top |
|
|
Rainmaker Veteran
Joined: 12 Feb 2004 Posts: 1650 Location: /home/NL/ehv/
|
Posted: Wed Apr 21, 2004 12:04 am Post subject: |
|
|
dudds wrote: | Hi dsd,
It turns out that I don't have dma enabled on my system either. When I enter the following command:
dsd wrote: |
as root:
lspci is part of the pciutils package.
|
I get the following line:
00:1f.1 IDE interface: Intel Corp. 82801EB Ultra ATA Storage Controller (rev 02)
If I then do a make menuconfig and look through all the options I can't seem to find anything that resembles the above. Do you have any suggestions??
Also I see an option "enable DMA only for disks" should this option be selected or not?? in my case it isn't.
catch ya,
Dave |
DO NOT enable "enable DMA only for disks". This causes DMA to be diabled for CD-ROM / DVD players.
Also you could try hdparm -d1 -X69 /dev/hda
This can be dangerous (see man), but most modern harddisks can handle this |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Wed Apr 21, 2004 2:25 pm Post subject: Re: Toshiba 2510CDS |
|
|
Delirium wrote: |
The model is a Satellite 2510CDS and the lspci output is as such:
00:10.0 IDE interface: Toshiba America Info Systems: Unknown device 0102 (rev 33) |
please post output of
_________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
Delirium n00b
Joined: 04 Jan 2003 Posts: 29 Location: Brisbane
|
Posted: Thu Apr 22, 2004 12:14 am Post subject: lspci -n |
|
|
Here is the output from lspci -n
00:00.0 Class 0600: 1179:0601 (rev a2)
00:04.0 Class 0300: 102c:00c0 (rev 64)
00:0b.0 Class 0c03: 1033:0035 (rev 02)
00:10.0 Class 0101: 1179:0102 (rev 33)
00:11.0 Class 0780: 1179:0701 (rev 23)
00:13.0 Class 0607: 1179:060f (rev 07)
00:13.1 Class 0607: 1179:060f (rev 07)
I also have some warnings in my acpi which I can list later if needed. I have to go to uni right now. Thanks for helping out if you can. |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Thu Apr 22, 2004 10:19 am Post subject: |
|
|
your device is:
1179: Toshiba
0102: Extended PCI IDE Controller
i can't really tell, but i think this might be supported by the generic ide drivers that get compiled by default
does the following command work:
Code: | hdparm -d1 /dev/hda |
_________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
Delirium n00b
Joined: 04 Jan 2003 Posts: 29 Location: Brisbane
|
Posted: Thu Apr 22, 2004 11:47 am Post subject: |
|
|
dsd wrote: |
does the following command work:
Code: | hdparm -d1 /dev/hda |
|
No unfortunatly not. I think it may be that the dsdt in the acpi is a little buggy but it only gives warnings. Everything seems to work fine besides that.
here is the output to my dmesg(link removed).
and an output from hdparm(link removed).
and the current kernel(link removed) config I'm playing with.
I'm still playing with the kernel config so there may be some suspect stuff in there. Toshiba laptops in general seem to be a little difficult to work with. As far as I know I can't compress the Virtual screen from 1024x768 into 800x600 either. But you can't have everything . The laptop is on loan from my lady anyway.
Last edited by Delirium on Thu Apr 22, 2004 11:29 pm; edited 1 time in total |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
|
Back to top |
|
|
Delirium n00b
Joined: 04 Jan 2003 Posts: 29 Location: Brisbane
|
Posted: Thu Apr 22, 2004 2:32 pm Post subject: Finally! |
|
|
dsd wrote: | ...then recompile kernel, copy over to /boot, reboot, and try switching dma on with hdparm if it isn't on already |
Hdparm wasn't needed...youre a legend.
There isn't a huge jump in performance but it's better than nothing. And at least the cpu isn't doing all the work! That is the general idea with Direct Memory Access isn't it?
Quote: | With DMA
/dev/hda:
Timing buffer-cache reads: 148 MB in 2.01 seconds = 73.72 MB/sec
Timing buffered disk reads: 34 MB in 3.03 seconds = 11.20 MB/sec
Without DMA
/dev/hda:
Timing buffer-cache reads: 148 MB in 2.01 seconds = 73.57 MB/sec
Timing buffered disk reads: 8 MB in 3.19 seconds = 2.51 MB/sec |
I have decided to go with the oss module for the sound card as the alsa driver has too much fiddling for my likings but everything works now! If I could just get that pesky xdm to have shutdown and reboot buttons I'll be all set. Thanks again. |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Thu Apr 22, 2004 2:50 pm Post subject: Re: Finally! |
|
|
Delirium wrote: | There isn't a huge jump in performance but it's better than nothing. And at least the cpu isn't doing all the work! That is the general idea with Direct Memory Access isn't it?
|
you are correct in saying that 11mb/sec is not very fast. but then again, this is a laptop, the hard disks are very compact and don't run anything like as well as their full size counterparts.
i suspect that you might get a small increase (e.g. 2-3mb/sec) if toshiba released documents about their IDE chips, as a toshiba driver would probably perform better than generic.
i'll submit this patch to the kernel now, i'll let you know if/when it gets accepted. for now you will just have to manually patch any newer kernels you choose.
and yes, DMA greatly reduces CPU usage during disk activity. i'm not sure if that is an intention or a side effect, but yes it certainly does happen
i'd suggest you make new threads for any other (non-ide) issues you have _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Wed Apr 28, 2004 8:05 am Post subject: |
|
|
it's been accepted into 2.6.6-rc3, and 2.6.6 final is due out at the end of the week (which will obviously also include the patch). _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
Delirium n00b
Joined: 04 Jan 2003 Posts: 29 Location: Brisbane
|
Posted: Wed Apr 28, 2004 9:34 am Post subject: 2.6.6 |
|
|
Great to here...thanks again for the help. |
|
Back to top |
|
|
firephoto Veteran
Joined: 29 Oct 2003 Posts: 1612 Location: +48° 5' 23.40", -119° 48' 30.00"
|
Posted: Fri May 28, 2004 9:56 pm Post subject: |
|
|
I still can't get dma working. I get:
Code: | bash-2.05b# hdparm -d1 /dev/hda
/dev/hda:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off) |
I've tried many different kernel configs but nothing seems to work. If someone has a older Toshiba with dma working I'd like to see and try your kernel .config.
Code: | bash-2.05b# lspci -n
0000:00:00.0 Class 0600: 1179:0601 (rev a0)
0000:00:04.0 Class 0300: 102c:00e5 (rev c6)
0000:00:0b.0 Class 0c03: 1033:0035 (rev 02)
0000:00:11.0 Class 0780: 1179:0701 (rev 21)
0000:00:13.0 Class 0607: 1179:060f (rev 20)
0000:00:13.1 Class 0607: 1179:060f (rev 20)
bash-2.05b# lspci
0000:00:00.0 Host bridge: Toshiba America Info Systems 601 (rev a0)
0000:00:04.0 VGA compatible controller: Chips and Technologies F65555 HiQVPro (rev c6)
0000:00:0b.0 USB Controller: NEC Corporation USB (rev 02)
0000:00:11.0 Communication controller: Toshiba America Info Systems FIR Port (rev 21)
0000:00:13.0 CardBus bridge: Toshiba America Info Systems ToPIC97 (rev 20)
0000:00:13.1 CardBus bridge: Toshiba America Info Systems ToPIC97 (rev 20) |
Code: | bash-2.05b# dmesg | grep -i ide
BIOS-provided physical RAM map:
CPU: After generic identify, caps: 008001bf 00000000 00000000 00000000
CPU: After vendor identify, caps: 008001bf 00000000 00000000 00000000
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
/dev/ide/host0/bus0/target0/lun0: p1 p2 p3
|
Code: | bash-2.05b# cat /usr/src/linux/.config | grep -i ide | grep -v "#"
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_IDE_TASKFILE_IO=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_IVB=y
CONFIG_IDEDMA_AUTO=y
|
|
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
|
Back to top |
|
|
firephoto Veteran
Joined: 29 Oct 2003 Posts: 1612 Location: +48° 5' 23.40", -119° 48' 30.00"
|
Posted: Fri May 28, 2004 10:13 pm Post subject: |
|
|
It's a Toshiba 325CDS, 233mmx pentium, 4gb hdd, 96mb ram. |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Fri May 28, 2004 10:46 pm Post subject: |
|
|
there is no ide controller in your lspci output. i'm not too knowledgeable about old systems like this - perhaps the IDE controller is ISA-based? or maybe it doesnt even have one..? i'm not too sure where you can go from here , but i doubt even if you did get DMA going you would notice much of a speed improvement. _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
Delirium n00b
Joined: 04 Jan 2003 Posts: 29 Location: Brisbane
|
Posted: Fri May 28, 2004 11:32 pm Post subject: |
|
|
firephoto wrote: | If someone has a older Toshiba with dma working I'd like to see and try your kernel .config.
|
I can show you my 2.6.5 config but I'm not sure it will help much. I used the generic toshiba patch that DSD posted for me and dma mode was started on my Toshiba 2510CDS. Since the 2.6.6 Kernel is out soon you could wait till it comes into portage.
DSD seems to think that your laptop has an ISA bridged ide interface. Do you have ISA support compiled in? One final link that I looked at while configuring my kernel might help you a little but it is mostly just on the hardware specs and installing RedHat. I'm not sure if the page is still up anymore but it was about the Toshiba 335. |
|
Back to top |
|
|
firephoto Veteran
Joined: 29 Oct 2003 Posts: 1612 Location: +48° 5' 23.40", -119° 48' 30.00"
|
Posted: Sat May 29, 2004 2:07 am Post subject: |
|
|
Well I was overlooking some things and I guess I don't have a pci-ide controller. I guess it's an ISA controller or some other proprietary toshiba thing. I enabled scsi but nothing got recognized different. I get about 3.5mb transfer rates now and it just crawls. I'm going to try the oldest 2.4 kernel in portage and see if it works. I read something about 2.4.18 working for someone then 2.4.22 didn't work with dma. I tried your config too Delirium and it didn't help or hurt any. |
|
Back to top |
|
|
|