Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CD Burning Kills X Performance
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
keenan
n00b
n00b


Joined: 30 Oct 2002
Posts: 33

PostPosted: Fri Apr 25, 2003 5:01 am    Post subject: CD Burning Kills X Performance Reply with quote

I recently installed Gentoo on my workstation again. Previously I had used a Ricoh 6x burner, and had no problems, but I have since upgraded to an LG 48x IDE model. I'm using ide-scsi to map it onto a virtual scsi interface to use with cdrdao etc. I went ahead and burned a test cd, and while it burned fine (thanks to burn-proof, i suspect), it obliterated my X performance, response times were on the order of seconds, and even the mouse was rather laggy. My first thought was DMA, so I went ahead and checked /proc/ide/hdd/settings:
Code:

root@qubit hdd # cat /proc/ide/hdd/settings
name                    value           min             max             mode
----                    -----           ---             ---             ----
bios_cyl                0               0               1023            rw
bios_head               0               0               255             rw
bios_sect               0               0               63              rw
current_speed           66              0               69              rw
ide_scsi                1               0               1               rw
init_speed              12              0               69              rw
io_32bit                1               0               3               rw
keepsettings            0               0               1               rw
log                     0               0               1               rw
nice1                   1               0               1               rw
number                  3               0               3               rw
pio_mode                write-only      0               255             w
slow                    0               0               1               rw
transform               1               0               3               rw
unmaskirq               1               0               1               rw
using_dma               1               0               1               rw


Looking good, as far as I can tell. I also checked /proc/ide/via (my board is powered by a KT133, 82c686b), and it reports that UDMA 33 is being used on that channel (I only have 40w cables).

I've now tested with DMA enabled and disabled, as well as with cdrdao and cdrecord. All exhibit the same problem, though PIO mode is much too slow. Anyone got any ideas? (btw..this wasn't an issue using Windows, as bad as that sounds). This also isn't an issue with IDE hard disks, I get about 32MB/sec from /dev/hda (hdparm -t), with no noticible CPU hit.
Back to top
View user's profile Send private message
jbrown
Tux's lil' helper
Tux's lil' helper


Joined: 17 Feb 2003
Posts: 81

PostPosted: Sat Apr 26, 2003 1:13 am    Post subject: Reply with quote

the 2.4 kernel can't do cd-writing using dma. I tried the 2.5.67 (it can) and it was so much better. you don't have to use scsi emu with 2.5

if you are currently running as it as root, try not doing so. this will make x more responsive because the burning process cannot get absolute priority. However not running as root will rely on burnproof much more.
Back to top
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Sat Apr 26, 2003 1:32 am    Post subject: Reply with quote

I don't know about the windows comparison aspect but certainly burning at this much increased massively increases CPU utilisation.

Puggy
_________________
Where there's open source , there's a way.
Back to top
View user's profile Send private message
keenan
n00b
n00b


Joined: 30 Oct 2002
Posts: 33

PostPosted: Sat Apr 26, 2003 2:02 am    Post subject: Reply with quote

jbrown wrote:
the 2.4 kernel can't do cd-writing using dma. I tried the 2.5.67 (it can) and it was so much better. you don't have to use scsi emu with 2.5

if you are currently running as it as root, try not doing so. this will make x more responsive because the burning process cannot get absolute priority. However not running as root will rely on burnproof much more.


Nope, don't burn as root, but I'll check out the 2.5 kernels, thanks for the info. Of course, with a 6x burner this was never a problem ;)
Back to top
View user's profile Send private message
Death Valley Pete
n00b
n00b


Joined: 25 Mar 2003
Posts: 49
Location: The Inland Empire

PostPosted: Sat Apr 26, 2003 3:19 am    Post subject: Reply with quote

jbrown wrote:
the 2.4 kernel can't do cd-writing using dma. I tried the 2.5.67 (it can) and it was so much better. you don't have to use scsi emu with 2.5


You don't with 2.4, either, if you've got the right software. I use xcdroast (I have simple tastes) and the lastest cdrtools (I'm at 2.01a11 as of this morning, but I think that 2.01a8 is flagged stable). It works fine without scsi emulation. It does make everything run a bit slow when it's writing, but no more burning that I do, I was willing to make the tradeoff (especially since my drive's a combo dvd drive and I might get around to installing xine someday).

You've got me thinking, though. Do I want to try a development kernel to improve cd writing performance? I'm thinking about it. :wink:
_________________
<instert pithy statement here>
Back to top
View user's profile Send private message
keenan
n00b
n00b


Joined: 30 Oct 2002
Posts: 33

PostPosted: Sat Apr 26, 2003 11:20 am    Post subject: Reply with quote

Alrighty, I've installed 2.5.68-mm2, and the problem is still persisting, perhaps even a little worse.

I did some simple benchmarking (using sg_read and hdparm). When started with ide-scsi, I can read at a dismal 0.32MB/s, with a very noticable performance loss. When started using the normal ATAPI cdrom driver, I can get about 3.3MB/sec with the same CD. This would lead me to believe there's a bug in the ide-scsi implementation, or that it simply is not using DMA mode for some reason.

I will try compiling cdrdao from source and see if it includes the new features in cdrecord for ATAPI drives, as cdrecord works fine in ATAPI mode. I do, however, need the functionality of cdrdao. If anyone has a quick fix for me, I'd be glad to hear it.
Back to top
View user's profile Send private message
keenan
n00b
n00b


Joined: 30 Oct 2002
Posts: 33

PostPosted: Sat Apr 26, 2003 11:52 am    Post subject: Reply with quote

In case anyone else experiences the same issue, I found this post on the cdrdao sourceforge project page:

Quote:

This is a known bug, it is due to the fact that the cdrdao does not pay attention to IDE settings(DMA) and so it only uses regular ide access through ide-scsi emulation. cdrecord does not have this problem because it DOES pay attention to IDE settings and therefore enables DMA transfers.

The cause for the high cpu usage and buffer underuns at high burn speeds is due to cdrdao not using the high transfer rate modes of IDE.

site tight, willmore has been working on this(probably the only person working on cdrdao right now) and he's never done work in this area so he's learning as he goes, hopefully he'll get some help or figure it out and get a patch out to fix the problem.


Hopefully it's fixed soon, I'm trying cvs now to see. I'll update with my findings.

Update
I've tried ATAPI burning with cdrecord and kernel 2.5.68-mm2, and it works flawlessly. Full 48x burning with no buffer underruns and negligible cpu usage. Therefore I assume this is a bug in the ide-scsi code somewhere, and unfixible by me. If cdrdao could be updated to use the latest cdrecord libs, I think it would work with ATAPI, however.
Back to top
View user's profile Send private message
jbrown
Tux's lil' helper
Tux's lil' helper


Joined: 17 Feb 2003
Posts: 81

PostPosted: Sat Apr 26, 2003 3:06 pm    Post subject: Reply with quote

Just so people know, you need cdrtools 2.01_alpha09 for kernel 2.5 ide burning. You specify the dev as dev=/dev/hd?. It took forever for me to find that out. It should then use dma if you have it enabled (it normally is by default). Obviously you need atapi compiled in the kernel or loaded as a module and not scsi-ide emu.
Back to top
View user's profile Send private message
keenan
n00b
n00b


Joined: 30 Oct 2002
Posts: 33

PostPosted: Sat Apr 26, 2003 3:13 pm    Post subject: Reply with quote

jbrown wrote:
Just so people know, you need cdrtools 2.01_alpha09 for kernel 2.5 ide burning. You specify the dev as dev=/dev/hd?. It took forever for me to find that out. It should then use dma if you have it enabled (it normally is by default). Obviously you need atapi compiled in the kernel or loaded as a module and not scsi-ide emu.


Yup, this works perfect :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum