LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-23-2004, 01:11 PM   #1
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Rep: Reputation: 30
Unhappy File copies makes my computer slow down


Hi!

I don't know why, but every file copy i make is followed by a huge "lag". And during this time my hdd is/are working at 100% (XMMS stops for some seconds, then restart, then stops, etc... like if another apps was taking 100% of the cpu).
It reminds me Windows 95

i got it on each command that demand writing access to the hdd like "cp" or "apt-get install"...

Here is my hdd installation:
Master: Seagate 60Go
Slave: IBM 120Go
/dev/hda1 -> /boot
/dev/hda2 -> swap
/dev/hda3 -> windowsxp
/dev/hda5 -> /
/dev/hda6 -> /home
/dev/hdb1 -> /share

I hope someone has a solution, or just have the same problem (maybe the last kernel 2.6 resolve this ?)

Thanks !
Creak
 
Old 02-23-2004, 01:28 PM   #2
asalford
Member
 
Registered: Nov 2003
Location: NC, USA
Distribution: unbuntu breazy
Posts: 143

Rep: Reputation: 15
During this process is your swap file growing?

How much ram do you have?

Also, read man hdparm to get the stats on your drive.

What type of hd cable are you using and its length?
 
Old 02-23-2004, 02:01 PM   #3
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Original Poster
Rep: Reputation: 30
right here, i can say to u that i have 780 Mo of DDR
the cables are normal UDMA 133 (flat with the really really thin cables in it)

for the swap, i dont know... but i've done a "top" and each time my PC goes down, it seems that "kupdated" and "kswapd" takes around 30% of the cpu...

k-thing aren't for KDE apps ??? i run under debian unstable/fluxbox...

I ll see for the man hdparm

Thanks
Creak
 
Old 02-23-2004, 02:11 PM   #4
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
K means kernel in this case... and you can see swap usage during top (the same lines that RAM usage)
 
Old 02-23-2004, 02:13 PM   #5
h2gofast
Member
 
Registered: Dec 2002
Distribution: Debian
Posts: 154

Rep: Reputation: 30
definitely read the man pages for hdparm
as root try hdparm -d 1 /dev/hda for starters.
 
Old 02-23-2004, 02:56 PM   #6
asalford
Member
 
Registered: Nov 2003
Location: NC, USA
Distribution: unbuntu breazy
Posts: 143

Rep: Reputation: 15
you may want to consider moving the second hd to master on the second ide channel. I missed that earlier.
 
Old 02-23-2004, 07:04 PM   #7
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Original Poster
Rep: Reputation: 30
I've looked what was hdparm, i didn't install it because I already have apm and it looks like if I install hdparm I have to uninstall apm... no ?

what is the main difference between those two ?? should i install hdparm instead of apm ??

EDIT> Ok i've installed hdparm (it's ok for apm, i was misunderstanding )
The DMA seems to be the problem, there is what it says to me :
Code:
~> hdparm -d1 /dev/hda5
/dev/hda5:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Invalid argument
 using_dma    =  0 (off)
U have a solution ???

Thanks again for all the answers !
Creak

Last edited by Creak; 02-23-2004 at 07:28 PM.
 
Old 02-23-2004, 07:33 PM   #8
asalford
Member
 
Registered: Nov 2003
Location: NC, USA
Distribution: unbuntu breazy
Posts: 143

Rep: Reputation: 15
Try setting the 2nd drive as master on the 2nd ide. Also, look at your bios to make sure that you have udma optioned for the drives.

run this command and post the output.

hdparm -Tt /dev/hda
 
Old 02-25-2004, 06:40 PM   #9
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Original Poster
Rep: Reputation: 30
Why putting my second disk as master on the 2nd ide will change something ? It's impossible to have more than 2 "fast" hdd on Linux because DMA is disabled otherwise ? I don't understand...

I haven't found anything about DMA in my BIOS... I've checked each tab...

Here is the output of your command :
Code:
~> hdparm -Tt /dev/hda
/dev/hda:
 Timing buffer-cache reads:   1164 MB in  2.00 seconds = 582.00 MB/sec
 Timing buffered disk reads:   12 MB in  3.05 seconds =   3.93 MB/sec
Hope it helps
Creak
 
Old 02-26-2004, 07:44 AM   #10
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Original Poster
Rep: Reputation: 30
almost resolved !

ok !!!! it's almost resolved !!!
I looked over again my kernel config setup, and i saw that i had a module called VIA82CXXX, i loaded it and i tried hdparm -d1 /dev/hda and it's ok !!! it's worked !!!

I got a last problem... the DMA is disable at startup... i don't understand why...
Should i set the via module in the kernel and not in module ??

Thanks a lot for everything !!
Creak
 
Old 02-26-2004, 07:56 AM   #11
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
look in your kernel config if you can enable this option: CONFIG_IDEDMA_PCI_AUTO
This option allows you to automatically enable DMA at startup
 
Old 02-26-2004, 09:10 AM   #12
asalford
Member
 
Registered: Nov 2003
Location: NC, USA
Distribution: unbuntu breazy
Posts: 143

Rep: Reputation: 15
I am glad you are getting things going.

Quote:
Why putting my second disk as master on the 2nd ide will change something ?
Reading and writing to the same ide simultaneously does slow things down. They inevitably share the bandwidth if both are working on say a file copy from one drive to another. Splitting the drives on independent ide interfaces allows for utilization of both ide interfaces thus, both get the full bandwidth of the ide
 
Old 02-26-2004, 11:36 AM   #13
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Original Poster
Rep: Reputation: 30
@Oliv': Here is everything that is set in the IDE chipset section
Code:
#
# IDE chipset support/bugfixes
#
CONFIG_BLK_DEV_CMD640=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_PIIX=y
CONFIG_BLK_DEV_RZ1000=y
CONFIG_BLK_DEV_VIA82CXXX=m
CONFIG_IDEDMA_AUTO=y
CONFIG_BLK_DEV_IDE_MODES=y
To me, it seems like my drives should have DMA at startup, no ?

@alsaford: I understand now, i'll do it asap
But for the moment, i'm going to try to understand why DMA is disabled at startup...

Thanks again !
Creak
 
Old 02-26-2004, 11:59 AM   #14
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Yes, it should... What you can try is to pass this option to the kernel at boot:
ideX=dma where X is between 0 and 3 for example ide1.... more info in /usr/src/linux/Documentation/ide.txt
It may also comes from that DMA is possible since you have inserted Via82cxx as module... so at boot, the module is probably not inserted and so DMA is not enabled.
 
Old 02-27-2004, 06:49 PM   #15
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Original Poster
Rep: Reputation: 30
Ok it's solved !!!!

COOOL !!!

It's ok now !!! everything starts in dma with the good mode (even for the DVD writer )
To make it work, i had to put via2cxxx in the kernel and not as a module
(maybe a initrd could fix it if i really wanted to have it as a module, but it's ok )

Thanks a lot for your helps !!
I hope i will help someone someday, but i m still a young padawan

CYa !
Creak
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
CD-Rom reads/copies files slow. RoaCh Of DisCor Linux - Hardware 3 12-08-2004 11:49 AM
running dclient makes gnome and kde slow Steve Mading Linux - Wireless Networking 0 11-11-2004 03:13 PM
xmule makes internet very slow on mandrake 10 nboul Linux - Software 3 10-20-2004 03:54 PM
emerging makes everything slow doralsoral Linux - Software 6 05-30-2004 04:38 PM
Linux makes CDrom slow Kenelm Linux - Software 3 03-22-2002 01:10 PM

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

All times are GMT -5. The time now is 10:19 PM.

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