View previous topic :: View next topic |
Author |
Message |
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Wed May 11, 2005 5:32 am Post subject: X is slow when hdd or DVD player is working + slow CD mount |
|
|
Most of you will say that this is a problem with dma not being enabled, but this is not the case.
Code: |
hdparm /dev/hda
/dev/hda:
multcount = 16 (on)
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 16383/255/63, sectors = 80026361856, start = 0
|
Code: |
hdparm /dev/hdb --->DVD player
/dev/hdb:
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO failed: Invalid argument
|
What I realized is that X is slow when the hard disk or particularly the DVD is used. For example I was mounting a CD and I clicked on the icon to run gnucash. The system froze for a couple of seconds and gnucash came up only when the CD was mounted and konqueror was showing the contents of the CD.
I believe that the problem could either be in the fglrx driver (ATI) or because I have a SATA controller.
If I run lspci I get
Code: |
0000:00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 04)
|
This is the revelant output from dmesg
Code: |
libata version 1.10 loaded.
ata1: SATA max UDMA/133 cmd 0xE080ED00 ctl 0x0 bmdma 0x0 irq 11
ata2: SATA max UDMA/133 cmd 0xE080ED80 ctl 0x0 bmdma 0x0 irq 11
ata3: SATA max UDMA/133 cmd 0xE080EE00 ctl 0x0 bmdma 0x0 irq 11
ata4: SATA max UDMA/133 cmd 0xE080EE80 ctl 0x0 bmdma 0x0 irq 11
ata1: no device found (phy stat 00000000)
ata2: no device found (phy stat 00000000)
ata3: no device found (phy stat 00000000)
ata4: no device found (phy stat 00000000)
|
Does this mean that I do not have a SATA driver or that is not recognized?
In the kernel I have compiled the following
Code: |
[*] Serial ATA (SATA) support
<*> AHCI SATA support
< > ServerWorks Frodo / Apple K2 SATA support
<*> Intel PIIX/ICH SATA support
|
Is this all I need to do? Should not dmesg give some information about ata_piix?
Thank you
Last edited by MasterX on Thu May 12, 2005 3:06 am; edited 1 time in total |
|
Back to top |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Wed May 11, 2005 6:46 am Post subject: |
|
|
If you don't use the SATA Controller in Linux, just don't load the drivers. less parts less problems.
The SATA Controller searches for Drives connected to it and tells you there arent any.
If you have a second IDE Port, I would always plug the DVD Drive to another IDE Port than the Harddrive. |
|
Back to top |
|
|
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Wed May 11, 2005 3:33 pm Post subject: |
|
|
fangorn wrote: | If you don't use the SATA Controller in Linux, just don't load the drivers. less parts less problems.
The SATA Controller searches for Drives connected to it and tells you there arent any.
If you have a second IDE Port, I would always plug the DVD Drive to another IDE Port than the Harddrive. |
Unfortunately, this is a laptop and I can change nothing regarding the IDE ports.
You are right, I do not have a SATA driver, both of them are ATA, but since I have a SATA controller shouldn't I load the proper modules for it?
Of course I have an IDE controller
Code: |
0000:00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 04)
|
Are you suggesting that if the modules for the SATA controller are not loaded I will not have the problem that I am having right now? |
|
Back to top |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Thu May 12, 2005 5:35 am Post subject: |
|
|
If you don't load the driver for an unneeded piece of hardware, it is simply ignored. |
|
Back to top |
|
|
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Fri May 13, 2005 5:37 am Post subject: |
|
|
Things are really bad!!
I was burning a DVD and X was crawling. When the DVD was written everything went back to normal.
This is what I get from hdparm
Code: |
hdparm -tT /dev/hda
/dev/hda:
Timing cached reads: 3240 MB in 2.00 seconds = 1619.44 MB/sec
Timing buffered disk reads: 100 MB in 3.07 seconds = 32.62 MB/sec
|
I think this is OK, so where is the problem?
Thank you |
|
Back to top |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Fri May 13, 2005 6:12 am Post subject: |
|
|
I think it is time for you to make some extensive testing of the IDE Ports. This sounds more and more like a Hardware problem. Get some benchmark software for harddrives and test your disk. Look for any dropouts. Combine with simultaneous reading from CD. plug an external harddrive if you can get one, copy data from disk to disk and monitor Disk performance (f.i. with gkrellm), again combine with CD reading, ... |
|
Back to top |
|
|
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Fri May 13, 2005 7:06 am Post subject: |
|
|
fangorn wrote: | I think it is time for you to make some extensive testing of the IDE Ports. This sounds more and more like a Hardware problem. Get some benchmark software for harddrives and test your disk. Look for any dropouts. Combine with simultaneous reading from CD. plug an external harddrive if you can get one, copy data from disk to disk and monitor Disk performance (f.i. with gkrellm), again combine with CD reading, ... |
One thing that might be important is that during writting only a couple of percent of the CPU were used. The other thing is that since I have a laptop, I have a hard disk which propably runs at 5400 rpm. Can this low rpm explain this behavior? Also, I am using the reiserfs filesystem.
Finally, this is what I have in /etc/conf.d/hdparm
Code: |
hda_args="-a256A1c1d1m16u1"
cdrom0_args="-d1c1u1"
|
|
|
Back to top |
|
|
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Fri May 13, 2005 7:19 am Post subject: |
|
|
I emerged GKrellm, and I copied one folder with five files (total 1.2 GB) from one partition to the other.
The transfer rate changed from 0MB to 40MB, but most of the times it was around 20MB.
A couple of times GKrellm froze and a couple of times the transfer rate dropped to 0MB.
Is this normal? |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Fri May 13, 2005 3:37 pm Post subject: |
|
|
If your system becomes unresponsive under load it is probably the task manager in the kernel that is at fault not the program causing the load.
What kernel do you use?
I would suggest cko or nitro , from my experience both are very fast and responcive under load.
HTH _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Fri May 13, 2005 4:19 pm Post subject: |
|
|
The Speed of 5400 was sufficient for video editing not long ago
On the same disk from partition to partition the Head of the Disk has to jump from one partitition to the other to first read and the write a block. If it is possible test with writing to another drive. But IMHO there should be no drop to 0 MB.
The task manager problem is a possibilty you can easily get around by testing one of the more optimized kernels. If that doesn't fix it you may have a bigger problem with the hardware. Either the Chip is not fully supported or the Chip, the cable or the disk has a problem in the hardware |
|
Back to top |
|
|
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Fri May 13, 2005 8:10 pm Post subject: |
|
|
I am using 2.6.12-rc2 kernel.
I am starting to believe that the ICH6 chip is not supported very well or that fglrx is buggy.
Another possibility is that the DVD player is broken. I tried to copy a folder from the DVD to the hdd (I got about ~14MB), and a file was corrupted and the disk was spinning, I heard various disturbing sounds (like scratching a surface with your nails) and I had to power off the system. The system became unresponsive (although the CPU and the hdd were not used), and with a lot of effort I managed to close the programs that I had opened, and then to reboot the system, but I lost my patience and I powered it off. |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Fri May 13, 2005 10:52 pm Post subject: |
|
|
Be methodical,
if you think it may be a defective DVD do a HD to HD copy and see if it becomes similarly unresponsive.
If you think it may be X or fglrx do the same test from the login console, not from X - use alt-F2 to login from a second terminal to see if you can still type commands, list things or if it similarly slow .
I strongly suggest you look at another kernel patch set. It's not as complicated as it sounds and if it does not do what you want you can just edit one line in grub.conf to switch back.
I soon got off the std kernel when I started because they were unusably slow once you gave it something to do. Since 2005.0 switched to gentoo-dev-sources as std this may well be better then it was but I doubt you will look back once you have a faster kernel.
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Mon May 16, 2005 4:02 pm Post subject: |
|
|
Gentree,
I use the vanilla kernel because it is "stable". The patches that you find in other flavors of the kernel will eventually make it into the vanilla kernel, as soon as the developers are satisfied with their stability.
I do not know what is the problem with my system.
A couple of minutes ago I burned a DVD at 2x, although the maximum speed of my driver is 4x. During the writing the hard disk activity was 3MB/s and although the maximum transfer rate is 30MB/s (according to hdparm), it took a couple of seconds for Kmail to open the window to write my reply.
I know that 30MB/s is something that I may never obtain, but gkrellm has reported transfer rates of the order of 15MB/s, which means that I should burn the media at 4x, and I should not observe any delay when I open programs. |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Mon May 16, 2005 6:13 pm Post subject: |
|
|
Quote: | I do not know what is the problem with my system. |
Until you try to methodically determine what is happening you're not likely to . I made several suggestions above. It seems that you have exercised your constitutional right to not take any notice.
I cant be of help if you dont wish to try my suggestions .
Good luck _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Tue May 17, 2005 5:06 am Post subject: |
|
|
Gentree wrote: |
Until you try to methodically determine what is happening you're not likely to . I made several suggestions above. It seems that you have exercised your constitutional right to not take any notice.
I cant be of help if you dont wish to try my suggestions .
Good luck |
You are being a little harsh with me. Since, this is a laptop I can not transfer data from one HD to another. When I transfered data from one partition to another, the system was slow, which is normal since I was transfering at about 15MB/s.
I will try to install the gentoo-dev kernel, and I will test it
A while ago, I was burning an ISO image and when the CD was about to be ejected the system froze. It could be the kernel or even K3B
EDIT
While I was burning the ISO, I timed the time that it takes to start amarok. That time is smaller when I am using the DVD drive, which makes a little sense. On the other hand, because during the burning the transfer rate was about 1MB/s and the maximum transfer rate is 15MB/s, the delay is not due to the hard disk, but due to either the kernel or the X server.
EDIT 1
Which kind of kernel version were you referring to? Was it gentoo-sources or genkernel kernel? |
|
Back to top |
|
|
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Fri May 20, 2005 2:40 am Post subject: |
|
|
By doing some simple experiments I found that the transfer rate is small when the CPU is used. As a matter of fact, if the CPU is initially idle and then it is used, the transfer rate will decrease. I was burning a DVD and the transfer rate was 3MB/s and the CPU was not being used. When I clicked on the icon to start konqueror, the CPU usage percentage will go up and the transfer rate will drop.
Is this due to the kernel or the filesystem, which is a reiserfs. I know that this filesystem uses the CPU, but is this the only reason for the aforementioned behavior? |
|
Back to top |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Mon May 23, 2005 12:22 pm Post subject: |
|
|
In my experience the filesystem is near to irrelevant for the cpu usage. If you can SEE the cpu usage rise, then it is at least 10 percent. If you dont use a Pentium 100 I would not expect such an effect from reiserfs alone. This effect looks more like Multiword DMA (the simplest of all DMA modi) or a problem with your KDE.
Ever tested it without the KDE? Just start fluxbox and use rox as filemanager for a test. If the problem still is there, it is not a software problem. |
|
Back to top |
|
|
Sky n00b
Joined: 17 Jul 2004 Posts: 17 Location: Taiwan
|
Posted: Tue May 24, 2005 2:44 am Post subject: |
|
|
My 2 cents,
When troubleshooting, don't try to go every direction as the same time.
You spoken about maybe a hardware problem, so check your hardware first.
When and only when you are satisfied that your hardware is performing correctly, check kernel, then check software or something like that.
One step at a time.
There is plenty of hardware test on linux, ie http://ubcd.sourceforge.net/
Quote: |
Since, this is a laptop I can not transfer data from one HD to another. |
Ask a external usb HD or big usbkey to a friend for your tests, it may gives you an indication.
Output HD-> USB versus DVD-> USB |
|
Back to top |
|
|
|