Archive for the 'Linux' Category

MythTV High CPU Usage Resolved for the Time-Being

Monday, April 17th, 2006

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).