LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-26-2004, 05:12 PM   #1
TheOneKEA
Member
 
Registered: Oct 2003
Distribution: Debian GNU/Linux 11 (amd64) w/kernel 6.0.15
Posts: 299

Rep: Reputation: 30
Question 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.
 
Old 04-26-2004, 09:02 PM   #2
watashiwaotaku7
Member
 
Registered: Oct 2002
Location: wisconsin -- The Badger state
Distribution: gentoo
Posts: 654

Rep: Reputation: 30
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
 
Old 04-26-2004, 09:52 PM   #3
Axion
Member
 
Registered: Jan 2003
Location: Albany, NY
Distribution: Slackware 9.1, Gentoo 2004.1
Posts: 153

Rep: Reputation: 30
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.
 
Old 04-27-2004, 01:42 AM   #4
TheOneKEA
Member
 
Registered: Oct 2003
Distribution: Debian GNU/Linux 11 (amd64) w/kernel 6.0.15
Posts: 299

Original Poster
Rep: Reputation: 30
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.
 
Old 05-14-2004, 09:06 AM   #5
caio80
LQ Newbie
 
Registered: Oct 2003
Location: Italia
Distribution: Gentoo
Posts: 4

Rep: Reputation: 0
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
 
Old 05-14-2004, 09:56 AM   #6
LavaDevil94
LQ Guru
 
Registered: Jul 2003
Distribution: Gentoo 2004.2: Who needs exmmpkg when you have emerge?
Posts: 1,795

Rep: Reputation: 47
Try this:
su
hdparm -d1 /dev/X
where X is the name of your DVD drive.
 
Old 05-14-2004, 10:23 AM   #7
caio80
LQ Newbie
 
Registered: Oct 2003
Location: Italia
Distribution: Gentoo
Posts: 4

Rep: Reputation: 0
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.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cpu and memory utilization laxmi_cs Linux - General 2 08-29-2005 04:06 PM
per process cpu utilization kunal_patel22 Linux - Software 1 05-19-2005 10:26 AM
getting total cpu utilization using c theog Programming 2 03-19-2005 04:41 PM
high cpu utilization under heavy traffic load electron707 Linux - Security 4 01-13-2005 08:59 AM
100 % CPU utilization Ganesh Kamat Linux - General 14 04-18-2003 01:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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