LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Heavy Utilization of the CPU when playing back DVDs (https://www.linuxquestions.org/questions/linux-software-2/heavy-utilization-of-the-cpu-when-playing-back-dvds-174847/)

TheOneKEA 04-26-2004 05:12 PM

Heavy Utilization of the CPU when playing back DVDs
 
I have a recurring problem with DVD playback on my laptop computer, in that it consumes an extreme amount of CPU cycles and subsequently plays back the video quite choppily. I have a Pentium 4-M 2GHz processor, 512MB of PC2100 DDR and a region-unlocked DVD-ROM drive, running kernel 2.6.6-rc2. The IDE chipset within the ICH3M southbridge is appropriately configured for DMA, and I've further tweaked it by activating 32-bit I/O support, IRQ unmasking and setting the readahead value to 256 (the default). XFree86 is appropriately set up with AGP online and the DRI drivers working, and the Xv services appear to be OK, according to xvinfo. My sound chip is an ESS Allegro 1898, powered by the ALSA maestro3 driver.

My preferred player is Ogle, and I'm using 0.9.2, with the DVD access libraries compiled locally (I recompiled libmad and enabled some of the optimizations). I also compiled Ogle from source and installed it, thinking that Ogle was simply unoptimized.

This met with partial success, and I noticed that CPU utilization now hovered around 30-40% when playing DVDs. Unfortunately, on occassion, unrelated system activity will disturb playback and CPU utilization will redline once more.

Does anyone have any ideas on how I can either tweak my hardware or modify my software in order to improve this? Could the culprit actually be Ogle, which to my knowledge uses OSS instead of ALSA? Could I try mplayer instead?

TIA.

watashiwaotaku7 04-26-2004 09:02 PM

I'm not really familiar with ogle but one solution would be to run ogle with nice -n -10 ogle where -10 is an integer between -20 and 20, -20 means it will not give up cpu cycles to any process 20 means it will give them to any process, be careful using -20 because if it locks up you will be unable to kill the process but -10 should be a good number, I would suggest trying mplayer and using different -vo options to test whether ogle is really the culprit

Axion 04-26-2004 09:52 PM

you might not have DMA enabled for your dvd-rom drive...worth a check. not sure how to do it for a non-hdd though.

TheOneKEA 04-27-2004 01:42 AM

Axion, I already checked and made certain that DMA was enabled, and it is. I will try using nice to see if that affects performance.

caio80 05-14-2004 09:06 AM

Same to me
 
Hi there,

this is my first post on linuxquestions, even if I use linux since quite a while. Anyways...

I too have a laptop really similar to TheOneKEA, I got an Asus L3840, P4-1.6 Mobile, Ati radeon 7500 dri-ok, kernel 2.6.5, 512 ddr 2100, and pretty much the whole rest of the setup is equal to his. Apart from playing DVDs, I found out cpu-usage way too heavy to be normal using xmame, and some power-hungry divxs. even with opengl games and screensavers, cpu goes anyways high, even if it does 1200fps with glxgears (notice that i googled around, and it's its usual score, once dri is setup well).

Actually, with a DVD, it goes well (20/30 % cpu), 'til at a certain point in which it raises up like hell, hitting the roof to 99,100 % cpu usage, as long as I decide to killall mplayer (or ogle, same with it).

Who knows? I use gentoo, with the following flags:


USE="acl acpi avibonobo curl dga doc dvd ethereal fbcon flac imap jackjava \
jikes joystick lirc oci8 odbc pcmcia pnp radeon samba speex sse usb \
wxwindows xinerama -kde -arts"

and

CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"

thanks in advance!

Ciao

Marcello

LavaDevil94 05-14-2004 09:56 AM

Try this:
su
hdparm -d1 /dev/X
where X is the name of your DVD drive.

caio80 05-14-2004 10:23 AM

good news everyone!

mplayer gives me no more problems about cpu usage. BUT still problems persist using opengl apps and xmame. Anyway, mplayer got solved out passing to the new kernel. Settings about cdrom dma, readahead and so on are all ok, thanks anyways LavaDevil.


All times are GMT -5. The time now is 08:04 AM.