[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

100% system CPU usage with cdrecord


I've burned CD's in linux before with great success, but I've upgraded
my hardware and am now having speed problems. Previously, the fastest burner I had was an HP 16x, which worked fine at full speed as long as DMA was enabled.

I've recently purchased a Plextor 712A, which will burn CDs at up to 48X
(along with DVDs at up to 12X, but one thing at a time!).  When running
cdrecord, I now have to enable 'burnproof' to prevent making coasters,
and I never seem to be able to write at more than about 25-28x. If I watch the output of 'top' while burning, the system CPU usage gradually increases to 100% as the image is burned, until burn-proof starts kicking in with system CPU usage hovering near 100% and write speed in the high 20's (around 27/28x).

Note that's it's *NOT* cdrecord itself that's eating CPU cycles, but something inside the kernel (or whatever else goes into the 'system' bin for CPU usage). There's also very little other load on the system (just a couple virtual terminals...no X windows running).

Dma *IS* enabled:
naibed:~# cat /proc/ide/hda/settings
name                value           min             max             mode
----                -----           ---             ---             ----
breada_readahead    4               0               127             rw
current_speed       66              0               70              rw
dsc_overlap         0               0               1               rw
file_readahead      0               0               2097151         rw
init_speed          12              0               70              rw
io_32bit            1               0               3               rw
keepsettings        0               0               1               rw
max_kb_per_request  64              1               127             rw
nice1               1               0               1               rw
number              0               0               3               rw
pio_mode            write-only      0               255             w
slow                0               0               1               rw
unmaskirq           1               0               1               rw
using_dma           1               0               1               rw

I've verified reads from the Plextor are fast and take little CPU by running iostat while doing an md5sum of the device (kind of hard to test writes, other than with something like cdrecord).

The write data is coming off a SATA drive (mounted as /tmp...no other system activity to this drive) which should have more than enough bandwidth (53M/s reads):

naibed:~# bonnie++ -u root -d /tmp
Version 1.03 ------Sequential Output------ --Sequential Input- --Random-
             -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
MachineSize K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
naibed   1G 12878  67 41023   8 22196   4 19980  70 53342   8 238.4   0
             ------Sequential Create------ --------Random Create--------
             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
       files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
          16 11134  19 +++++ +++  5433  11  4758  26 +++++ +++  1942   8

System HW specs:
  2.4G Athlon
  Asus A7N8X (NForce2) motherboard
  512M Ram (dual-channel)
  Plextor 712A burner as the primary PATA master
    (no other PATA devices)
  4x Seagate SATA 160G drives on a Promise TX4 controller
  On-board Silicon Image SATA controller is diabled via jumper

I'm running debian-testing (sarge) with the stock debian kernel: 2.4.26-1-386

cdrecord is version: 4:2.0+a30.pre1-1

The only kind of odd thing I'm doing is using the ATA support in
cdrecord to talk to the burner rather than SCSI emulation (I was having
problems getting that going...apparently I don't yet fully understand
the interaction of the new libata and the "hda=scsi" kernel command line
parameter), but trolling the mailing list seems to indicates this should be faster than the older scsi emulation. The actual cdrecord command I'm using:

cdrecord dev=ATAPI:0,0,0 driveropts=burnfree speed=48 -dao -v image.iso

...after which I get a report typically listing ~30 predicted buffer
underruns that were prevented.

It seems like this system ought to be fast enough to burn at 48x without
breaking a sweat...any suggestions for settings I can tweak or other
tests I can run?

Charles Steinkuehler

Reply to: