[mythtv-users] FE mini-freezes when watching some recordings

Matt Garman matthew.garman at gmail.com
Wed Feb 1 20:11:44 UTC 2012


On Wed, Feb 1, 2012 at 8:12 AM, Chris Lewis <chrislewis915 at gmail.com> wrote:
> I'm seeing similar on HD recordings from dvb-s2. When it happens the FE is
> completely unresponsive to ir remote or keyboard commands.
>
> I did get some FE/BE logs the other night but they didn't contain much.
> I'll try again with -v playback to see if it sheds any light.
>
> Fwiw I'm on a dual core p4 @ 3.2ghz with 4gigs ram and a gt430 using vdpau

Is this a pure FE box, i.e. are the FE and BE separate machines?  If
so, you have to consider network issues and disk I/O on the BE.  If
your network connection is wireless, try (if possible, at least
temporarily) a wired connection.

Also, run something like this on the backend while watching something
that has the freeze phenomenon:

iostat -ktx 1 > iostat.txt

When you see a freeze, make a note of the time.  Then go look at the
iostat.txt file, and look for the timestamp(s) where the freeze
occurred.  If you see your mythtv storage device at (or near) 100%
utilization during this time, then you have the culprit (disk IO
bottleneck).  This is possible if, for example, you are trying to
playback from the same disk that is also recording multiple streams
and doing some kind of job (commercial flagging, transcoding, etc).
Also, there's a chance the disk is going bad and timing out on reads.
Do a "smartctl -t long <device>", wait however long it says, then
"smartctl -a <device>" and see if anything looks suspicious.

Note that the above iostat command dumps output every one second, so
the file will grow relatively quickly---don't let it run indefinitely!

If this turns out to be the case, the solution is more and/or faster
disks, and/or increasing buffering on the client and/or server side
(or a new disk if smartctl shows errors).

Another thought: try doing an NFS mount of the BE's storage directory,
and use an external player like mplayer or vlc to play your recording
file.  Does it exhibit the same behavior?  This will help isolate the
problem (is it MythTV specifically or something lower level?).  I know
at least with mplayer, you can set the buffer size.  So if you see the
freezing in mplayer, increase the buffer, and see if it still happens.

Another tool I've found semi-useful for tracking down performance
issues is "sar".  On CentOS (and presumably Fedora), it's part of the
"sysstat" package (not sure where it's found on other distros).  But I
set this up to be much more aggressive than the defaults, taking
samples every five seconds.  I'd suggest running this on both the
frontend and the backend.

If it's not disk IO, and sar doesn't show any obvious problems (e.g.
CPU load), then you might also want to try running some network
bandwidth tests.  There are lots of tools for this... but it's not
uncommon to have a bad wire or a switch overheating or a buggy NIC
driver... at least check the obvious things first: duplex and speed
settings via ethtool (e.g. one is configured 100/Full and the other
1GbE/half will give you all kinds of grief).  Also do a simple
"ifconfig" and look for interface errors.  ethtool -S will give you
lots of low-level info, depending on the hardware and driver.

I have never experienced the particular freezing issue myself, but the
above are general tips that can hopefully track down and isolate the
problem.

> Any advice appreciated
>
> On 1 Feb 2012 13:44, "Tim Draper" <veehexx at gmail.com> wrote:
> FE is a 330 atom with ion & VDPAU enabled.
> 2gb ram (2x 1gb iirc).
>
> when i watch shows, that are over a certain size (1hour 5gb HD
> recordings definitely do it, 40min 1.4gb files seem not to), i will
> get random mini freezes of the video after a certain period.
> the other night i was watching a 5.6gb recording, and it froze twice;
> once around 25mins, and again around 50min area. rewinding and
> replaying again does not re-produce that mini-freeze.
>
> what i suspect is happening is the video is being buffered to RAM, and
> it then gets wiped after a period (once ram is full?), which is whats
> causing the freezing.
>
> i have been SSH'd into the FE while a freeze occured. while i didnt
> catch resource usage at that exact time, CPU and RAM utilization were
> acceptable within 10-20 seconds either side of the freezing.
> (mythfrontend process)
>
> can anyone confirm/deny if my suspicions are correct, and what would
> be an appropriate solution? more ram would be an idea, but due to the
> atoms 3gb RAM limit, then i'd likely still see the freeze if it is
> indeed down to a flushing RAM issue.
> i know atoms arent highly recommended here, but i dont believe the
> underpowered state is the issue here, else i'd be experiencing issues
> alot closer together. HD playback seems fine for the shorter shows
> (around 30mins), but freezes do occur for longer running shows (1h).
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


More information about the mythtv-users mailing list