MythTV High CPU Usage Resolved for the Time-Being
I used to run my mythbackend/frontend on an Athlon XP @1733Mhz. It was mostly able to keep up with 1080i using Bob deinterlacing, and could easily do 720p.
With a recent switch of hardware to an Athlon 64 @1800Mhz on an Asus A8V motherboard, the hardware has been using 92% or more CPU to play 1080i using Bob deinterlacing, and 60-65% CPU to play 720p…
Given the old 32 bit hardware was doing the same job almost as well, I found the performance unacceptable. Because the high CPU usage for 1080i with Bob deinterlacing was causing glitching issues, I switched over to linear blend deinterlacing and saw a drop to about 70% CPU for 1080i. While this wasn’t the ideal solution, it at least kept me from going nuts for a while.
Today a user on irc.freenode.net #mythtv-users suggested I boot the machine using the “noapic” kernel option. What this does is disable the APIC interrupt routing. Immediately, I noticed a difference. Playing 720p only used 35-40% CPU and playing 1080i with Bob deinterlacing only used 55-60% CPU.
It may not be the long-term solution, as I believe there are benefits to having a working APIC configuration, but at least for now it has made using the mythfrontend much smoother and less temperamental.
So if you’re seeing overly high CPU usage during playback, check to see if APIC is being used, and if so, change your kernel command line parameters to include “noapic”. You can do this by editing the appropriate line(s) in /etc/lilo.conf and running lilo, or editing the /etc/grub.conf or /boot/grub/menu.lst file and adding the parameter to the appropriate line(s).
April 18th, 2006 at 12:22 pm
Thank you for the update Matt!
September 25th, 2006 at 8:54 pm
This could be due to the fact that the Athlon64 CPU has the ability to dynamically scale the speed of the CPU. I can scale my 3Ghz Athlon64 to about 1.2Ghz using the powernowd daemon and the userspace cpu scaling kernel modules. You might want to check /proc/cpuinfo and make sure your CPU is running at full speed with ACPI turned on. In theory the CPU should scale up, but it is possible for the drivers to be a little laggy in multimedia applications.
Just a thought.
I’m fairly new to OSX and I stumbled across your site whilst looking for OSX Intel MythTV 0.20 binaries. Great Site!
October 12th, 2006 at 1:24 am
Alex. I think you’re confusing APIC and ACPI. They’re quite different beasts.