LinuxQuestions.org
Visit Jeremy's Blog.
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 09-20-2005, 12:14 AM   #1
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
Laggy performance during cd-rom usage


Recently while copying a large file from a cdrom (/dev/hdc which I mount at /mnt/cdrom) to my local partition (/dev/hda1) I noticed that performance was seriously lagging. Normally I can compile or play games (basically run the CPU at 99-100%) and not notice this same lag. The mouse pointer was jolting all around the screen instead of a smooth motion.
I had heard something about keeping the cd drive and hard drive on seperate IDE channels or something...any ideas?
 
Old 09-20-2005, 09:31 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
I am assuming your optical drive connects to an IDE controller like a hard drive and not to a SCSI?

in which case, generally speaking the data transfer is only as fast as the slowest machine.
if you can....... set the optical to master and have it on its own ribbon/controller.

2) you can do your own real world tests without a program and with an intensive program running....maybe you have a hardware starting to the road to heaven?
could be ram so use memtest
could be harddrive could be optical etc.

find a known size large file and burn it to cdr and copy it back to hard drive from optical drive to see what it is versus do a google for the specs for your optical drive. Then repeat with your fav game running.

3) you can get stats from various linux executables like
top
ps
Gkrellm
 
Old 09-20-2005, 09:35 AM   #3
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
eg my cd transfer rate is 7800 Kb per sec vs 21600 for dvd
 
Old 09-20-2005, 12:17 PM   #4
addy86
Member
 
Registered: Nov 2004
Location: Germany
Distribution: Debian Testing
Posts: 332

Rep: Reputation: 31
If your drives use DMA, the CPU is hardly affected, no matter how slow the media are.
Try the following (as root):
hdparm /dev/hda
hdparm /dev/hdc
What does each say for using_dma?
 
Old 09-20-2005, 03:32 PM   #5
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Original Poster
Rep: Reputation: 31
Yes, my hard drives and CD drive are connected with IDE, not SCSI. I don't think it is an upcoming hardware failure, as everything runs fine under my Windows partition, and the RAM is fairly new. I'm away from my computer right now, but I'll check if DMA is enabled on my CD drive when I get home (I know that it is on for my hard drive). I think that maybe DMA isn't on the CD drive, which would explain a lot. The CD drive is 52x speed btw.
Thanks for the help.
 
Old 09-20-2005, 10:18 PM   #6
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
you can up the nice value on the copy so the kernel might relax a bit about handeling those cd drive interupts
 
Old 09-21-2005, 01:29 AM   #7
addy86
Member
 
Registered: Nov 2004
Location: Germany
Distribution: Debian Testing
Posts: 332

Rep: Reputation: 31
IMHO the nice value has nothing to do with the kernel, only with the amount of CPU time granted to the process.
 
Old 09-21-2005, 01:34 AM   #8
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Original Poster
Rep: Reputation: 31
Well, it turns out you had it right addy86, as here is the results from hdparm /dev/hdc
Code:
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
I guess I'll have to throw on DMA for the cd drive and give it a go! Thanks for the help and ideas, I'll try out giving copy a nice value, but that seems more like a temporary solution.
 
Old 09-21-2005, 04:13 AM   #9
addy86
Member
 
Registered: Nov 2004
Location: Germany
Distribution: Debian Testing
Posts: 332

Rep: Reputation: 31
Switching on DMA with hdparm -d will only last until the next reboot.

But usually DMA should be enabled for every device that supports it. Do you use a custom kernel? If yes, what does
grep IDEDMA_PCI_AUTO .config
and
grep IDEDMA_ONLYDISK .config
say (the first should be "yes", the second "no")?
 
  


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
Laggy sound DaBlade Linux - Software 3 05-20-2005 10:07 AM
Some sites really laggy WolfCub Linux - Networking 19 02-01-2005 08:02 PM
Laggy OS CarnageBox Red Hat 4 11-21-2004 04:32 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
CD-ROM performance after resetting the BIOS. habiblove General 16 08-13-2001 07:14 PM

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

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