[mythtv] Excessive CPU usage in svn on C3 + Unichrome
rrw at semiramis.org.uk
Wed Dec 21 06:15:59 EST 2005
First off, I'm not opening a ticket about this because I don't have the
relevant logs, or time to test a fix at present (my mythtv box is kinda in
use over Christmas :-)).
However, I had a brief look at current svn (8332) last night, and it appears
that I may have a problem with the new LiveTV streaming stuff. My
setup is an EPIA MS 12000 (C3 Nenemiah at 1.2GHz) with Openchrome's
CLE266 drivers and a Hauppauge Nova-T PCI. I'm running Linux 220.127.116.11.
With MythTV 0.18.2 and the plain xv drivers, a single LiveTV stream with
nothing else going on takes 5% of CPU for the backend and about 40% for
the frontend. With the xvmc-via driver, that falls to 15% for the frontend.
svn 8332 fires up LiveTV with the frontend at about 50% and the backend
at about 46%. As the stream initialises and we go through selecting codecs,
I get backend 5% frontend 70% or so for a while, followed by the frontend
shooting up to 50% and the backend taking between 50 and 80% of CPU. This
obviously leads to confusion, dropped TS frames from the tuner card, and
If you continue to run the (basically static) video for 30s or so, it does
pick up to being merely very jerky.
A little investigation suggests that most of the backend CPU is being eaten
by the output stage (though there is now quite a lot of code in the TS
processing path, which I suspect may hurt low-powered systems eventually).
(Incidentally, the bailout clause around dtvrecorder.cpp:280 is not going to
be loved by sensitive decoders, though since I don't believe in them, I
don't care :-))
I eventually managed to do some little good by tricking dtvrecorder into
batching its writes, but this merely lead to stop-starts on the frontend
side - the frontend would run the video as fast as it could until it ran
out, then hang with `prebuffering pause' - presumably because the PTS
had by that time long past. Commenting out the entire TS processing
stream did bring mythbackend's CPU usage under control (though the frontend
carried on using 30-40% as it failed to get packets).
Since this box is my main living-room TV interface, I've reverted to
MythTV 0.18.2, which works very nicely :-), but I thought the info above
might be useful. If anyone wants to follow it up, please let me know -
I have a built copy of svn which I can get going again after
the New Year to test with.
On a related note, since I'm now back at 0.18.2, I have monochrome OSD.
I'm planning to update danielk's cleanups of Ivor Hewitt's patch for
colour OSD in ticket 101 - I'm not going to spend much time on it, since
it will go away when 0.19 is released, but if anyone'd be interested in
it, I can add it to the ticket when I'm done..?
More information about the mythtv-dev