[mythtv-users] Optimizing MythTV for AMD64
krose+mythtv at krose.org
Sun Apr 3 15:21:40 UTC 2005
I posted the following on my homepage this morning:
I bought a dual Opteron 244 back in November of 2003 because I wanted a
really, really fast desktop machine. Around the same time, I started
playing with MythTV <http://www.mythtv.org/>, and it wasn't long after
that I got a pcHDTV <http://www.pchdtv.com> HD-2000 card and began
watching high-definition programming. Unfortunately, despite the
Opteron's superior I/O bus design and incredibly speedy processing, it
had more trouble decoding HDTV than did a much cheaper non-HT uniproc
It has taken quite some time for MythTV to get to the point where it can
reasonably be used with this configuration. Recently, a version of
ffmpeg that appears to be optimized for AMD64 <http://www.x86-64.org/>
has been imported into the Myth CVS repository: to get this, make sure
to uncheck the "uselibmpeg" option in Setup/TV Settings/Playback.
However, this alone isn't sufficient.
While I can't pinpoint the exact problem, I changed two major things in
one day that resulted in much improved performance:
1. /Cross/Downgraded from Debian <http://www.debian.org/> gcc-3.4 to
Ubuntu <http://www.ubuntulinux.org/> Hoary./ This is a non-trivial
operation if you are not used to screwing with Debian packages a
lot. I still find old pieces of gcc-3.4/4.0-based packages now and
then, and need to reinstall them from Ubuntu's archive when I find
them. I recommend reinstalling from scratch if you aren't
comfortable with recovering from broken libc packages by hand. :)
2. /Upgraded my kernel to 126.96.36.199./ I actually don't think this was
part of the performance improvement, but it was a variable, so I
didn't want to leave it out. If you have stability problems with
CONFIG_PREEMPT_BKL (preempting the big kernel lock), turn it off;
In sum, my configuration looks like the following:
* Hardware: Dual Opteron 244; Tyan <http://www.tyan.com/> Thunder
K8W S2885 mobo w/AMD-81x1 I/O interfaces; NVidia
<http://www.nvidia.com/> FX5600 AGP; 4 GB PC2700 (333MHz) dual DDR
SDRAM; Creative <http://www.creative.com/> SB Live! 5.1 with coax
* Distribution: Ubuntu Hoary
* Linux: 188.8.131.52 (See my kernel .config
* ALSA drivers: 1.0.8 (alsa-source 1.0.8-4ubuntu4)
* NVidia drivers: 7167 (nvidia-kernel-source 1.0.7167-0ubuntu25)
* MythTV configuration: CVS as of 2005-Apr-02. Configuration
options: --disable-audio-arts --disable-audio-jack --disable-lirc
--disable-joystick-menu --disable-firewire --disable-ivtv
--disable-xrandr --enable-opengl-vsync --enable-memalign-hack
* MythTV patches: [broken pthread_rwlock_*
* MythTV compilation: gcc-3.3, because the required Ubuntu packages
(e.g., libGLU, libqt-mt) are compiled with gcc-3.3 and link with
libstdc++5. I use make CC="gcc-3.3" CXX="g++-3.3" LINK="g++-3.3"
* MythTV config: turn off libmpeg decoding; use "ALSA:iec958" for
the sound device; turn on AC3 passthrough; turn on extra audio
Performance improved significantly under this configuration. The
following tests were performed with a playback window size of 1066x600
* Playback of a specific 1080i clip (CBS football) went from >99% of
one CPU (with dropped frames) under the old config to ~55% of one
CPU for mythfrontend and 15% for X.org with smooth playback.
* Playback of a specific 720p clip (FOX "24") went from >99% of one
CPU (with dropped frames) under the old config to ~40% of one CPU
for mythfrontend and 15% for X.org with smooth playback.
Furthermore, at full size (1280x1024 with the video letterboxed to
16:9), playback still runs smoothly, though 1080i playback consumes
close to 100% of one CPU for mythfrontend. Not clear why the playback
window size should matter with XVideo, but it does.
If you have success with this configuration, I'd love to hear about it.
If you have problems and are able to determine what I've left out, let
me know so I can add the appropriate config elements.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mythtv-users