[mythtv-users] Live TV Pauses
Ivan A. Beveridge
ivan at dreamtime.org
Thu Jul 1 07:34:12 EDT 2004
This may be of interest (context switches) ...
On Wed, Jun 30, 2004 at 10:25:17PM +0100, Ivan A. Beveridge wrote:
> On Wed, Jun 30, 2004 at 08:09:31PM +0100, David wrote:
> > Kevin Stussman wrote:
>
> > >but the part that is driving me crazy is:
> > >
> > >2. The live video pauses/jitters/slows down approx every 10 to 20
> > >seconds. My gut feeling is that either the decoder is somehow not
> > >keeping up with the video stream or the process of putting the images
> > >onto the TV is somehow too slow.
> I just saw some commonality in symptoms and (in this case) filesystem.
> It looks like we're also both using ALSA sound, as I'm running kernel
> 2.6 (where ALSA seems better supported).
> > So the captures are good.
> >
> > I don't think you are using XV properly
The output from xvinfo doesn't show anything wrong (or at least nothing
jumps out).
WRT alsa, I have added the entries to modprobe.conf that enable OSS
compatability mode. I am still getting the jitters (so to speak ;)
though.
Taking the "least complicated" option (viewing a previously recorded tv
programme) ...
The symptoms (aside from the obvious) are (user) CPU loading shoots up
when viewing the recording. The problem is that, when user CPU loading
is high (80-97p/c) nothing owns up to using that much CPU when viewing
in "top" ... which is annoying (and confusing). These are some outputs
of "vmstat 1" .... the context switches seem to be the most noticeable
change:
system idle (mythfrontend running):
---------------------------------
video:~# vmstat 1 5
procs -----------memory---------- ---swap-- -----io---- --system--
----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
3 0 16176 18436 3780 107792 29 11 300 139 12 23 31 2 64 2
0 0 16176 18388 3792 107792 0 0 0 20 1396 777 0 1 99 0
0 0 16176 18388 3792 107792 0 0 0 0 1391 763 0 2 98 0
0 0 16176 18388 3792 107792 0 0 0 0 1389 764 0 0 100 0
0 0 16176 18388 3792 107792 0 0 0 0 1392 761 0 0 100 0
---------------------------------
transition to viewing video (mplayer on divx3 [1]):
---------------------------------
video:~# vmstat 1
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
3 0 16176 13300 4268 108600 28 11 299 138 15 25 31 2 64 2
0 0 16176 13300 4268 108600 0 0 0 0 1393 761 0 0 100 0
0 0 16176 13332 4280 108600 0 0 0 20 1395 777 0 1 99 0
2 1 16176 4244 4280 112716 0 0 1060 0 1401 1306 33 13 49 5
0 0 16176 2912 4220 113328 0 0 1176 0 1449 1883 19 9 51 21
0 0 16176 2912 4220 113328 0 0 0 0 1426 1399 9 1 90 0
0 0 16176 2944 4220 113328 0 0 0 0 1425 1320 25 2 73 0
0 0 16176 2896 4252 113328 0 0 0 72 1445 1291 37 2 61 0
---------------------------------
above, "bi" shows where mplayer starts (jumps to 1060). You'll also
notice context-switches jump from 770-ish to 1300-ish.
transition to viewing recorded tv (this is a 4GB file, not transcoded):
---------------------------------
video:~# vmstat 1
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
2 0 16176 19752 4940 105188 28 11 298 138 20 29 31 2 64 2
0 0 16176 19752 4940 105188 0 0 0 0 1393 774 0 1 99 0
0 0 16176 19752 4940 105188 0 0 0 0 1382 753 1 1 98 0
0 0 16176 19704 4952 105188 0 0 0 20 1386 756 0 1 99 0
1 0 16176 19008 4952 105200 0 0 0 0 1393 2816 82 10 8 0
1 0 16176 7384 4952 115088 0 0 0 0 1430 2688 91 9 0 0
1 0 16176 2744 4860 119660 0 0 0 0 1438 2596 96 4 0 0
1 0 16176 2552 4860 119752 0 0 92 0 1439 2521 97 3 0 0
1 0 16176 2408 4888 119908 0 0 156 68 1449 2558 99 1 0 0
2 0 16176 2408 4888 119908 0 0 0 0 1438 2517 97 3 0 0
---------------------------------
Above, user-CPU shows where the playing starts (jump to 82). Again,
notice context switches.
Mplayer in myth is using the default settings (I didn't change anything
for movie viewing), so it's using XV under X.
This may be of use ... I can't see how an cpu-intensive thing like
mplayer viewing MPEG4 can cause a system to jump ~25-30p/c CPU, where
something less cpu-intensive (viewing MPEG2) causes the system to jump
~90p/c CPU.
Context switches may be a pointer:
* mplayer: + ~600/s
* myth: + ~1800/s
Can't really see what else to look at.
Again, a reminder of system setup:
* Epia MII 12000, 256MB RAM
* 80GB Fujitsu laptop disk (4500rpm) in UDMA5 mode.
* debian unstable
* kernel 2.6.6-epia1 (alsa with oss-compatability)
* root filesystem = reiserfs; mythtv data (.nuv, .avi, etc) = xfs
* myth 0.15.1 (frontend and backend) - no hardware acceleration
Cheers
Ivan
[3] For completeness, file shows the movie as: "AVI, 640 x 272, 23.98 fps,
video: DivX 3 Low-Motion, audio: MPEG-1 Layer 3 (stereo, 44100 Hz)"
--
Ivan Beveridge <ivan at dreamtime.org>
More information about the mythtv-users
mailing list