MythTV Front-End Performance Problems on Ubuntu
Ubuntu 8.10
After upgrading to Ubuntu 8.10, I started having performance problems with video playback on MythFrontEnd. I have a video encoder on my TV Tuner card, and I frequently record 2 show simultaneously, always with < 10% CPU utlization, so I knew mythbackend
wasn't the problem.
The symptoms I saw were:
- Temporary "freezes" in video playback. They lasted < 1/2 second each, and were spaced about 5-10 seconds apart at regular intervals.
- CPU running at 100%. My CPU has been running at 30-50% busy during playback for the past 3 years or so, on the same hardware and OS. So the 100% utilization is quite unusual.
- The freezes begin 5-10 minutes after playback begins
- running
top
shows high CPU usage inmythfrontend
, but it also indicates other programs running with high CPU use, which is unusual.
So I started an experiment: each night I altered my MythTV settings and observing the running system. the next day My family reported what they saw and I changed more settings. I tried the following things:
- defragmenting the filesystem with
xfs_fsr
(I'm using XFS on LVM...perfect for mythTV's large files). - inspecting cron jobs that run in the background
- removing unnecessary software
- changing my video driver and adjusting its settings (including compiz)
- restarting
mythfrontend
,mythbackend
, and the computer - killing running processes
It wasn't until I got to the last step--killing running processes--that I found a solution. I kept seeing gnome-screensaver
in the list of running processes, but it wasn't consuming a lot of CPU time. But that's when it hit me....screensavers kick in after a period of keyboard and mouse inactivity, which could explain why the symptoms start several minutes after the beginning of a TV program. And my efforts to catch the problem by suddenly bringing a process monitor into the foreground with <alt>-<tab> could be thwarted because of how screensavers react to keystrokes. So I decided to kill the screensaver...
killall gnome-screensaver
and the problem went away. But it returned the next day. I found that the screensaver had been restarted. So I went into the screensaver settings in Gnome and deselected the "Screensaver" checkbox. That solved the problem too, and it didn't return.
Late in the problem solving process, I found a particular google search (this query) that revealed plenty of issues between MythTV and gnome-screensaver
. Why is it that I find the answers after I solve the problem? :-(