[mythtv-users] Performance issues, or Why Mythtv hates Oprah

sdkovacs sdkovacs at gmail.com
Thu Mar 29 00:23:10 UTC 2007


The Oprah Winfrey show records every day at 4pm EDT, but there is
something on my box that is creating performance problems, and when
Oprah is choppy, I'm in trouble(WAF). This is my setup:

OS: Fedora Core 6, ATRPMS
Mythtv: .20-fixes (mythtv-0.20-153.fc6.at)
Computer: PIII-800Mhz, 384MB RAM.
Capture Cards: PVR-350, PVR-150

The symptom in Mythtv is that the recording intermittently skips a few
seconds. mythbackend.log has iobound errors and Orca graphs show that
the box is obviously stressed. I have mythtv setup to flag commercials
immediately upon the start of the recording and I don't have any
performance problems at any other time of day whilst recording. The
first place I looked was cron(see output below), but there are no jobs
running at that time. I'm looking for some tips on how to identify
what is stressing my box - maybe a command I can put into cron that
will identify the processes that are causing the problem.

Thanks in advance for any help.


a snippet from mythbackend.log:

2007-03-28 15:59:02.398 Started recording: Oprah Winfrey: channel 1021
on cardid 1, sourceid 1
2007-03-28 15:59:19.674 JobQueue: Commercial Flagging Starting for
Oprah Winfrey recorded from channel 1021 at Wed Mar 28 15:59:00 2007
2007-03-28 15:59:30.013 TFW, Error: Write() -- IOBOUND begin cnt(2048)
free(2047)
2007-03-28 15:59:31.017 TFW, Error: Write() -- IOBOUND end
2007-03-28 16:00:02.617 Using runtime prefix = /usr
2007-03-28 16:00:24.291 New DB connection, total: 1
2007-03-28 16:00:25.074 TFW, Error: Write() -- IOBOUND begin cnt(2048)
free(2047)
2007-03-28 16:00:29.162 Connected to database 'mythconverg' at host: localhost
2007-03-28 16:00:29.931 New DB connection, total: 2
2007-03-28 16:00:31.516 Connected to database 'mythconverg' at host: localhost
2007-03-28 16:00:39.536 TFW, Error: Write() -- IOBOUND end
2007-03-28 16:00:43.557 Connecting to backend server: 192.168.0.5:6543
(try 1 of 5)
2007-03-28 16:00:44.315 Using protocol version 31
2007-03-28 16:00:45.892 MainServer::HandleAnnounce Monitor
2007-03-28 16:00:47.501 adding: localhost.localdomain as a client (events: 0)
2007-03-28 16:00:49.107 MainServer::HandleAnnounce Monitor
2007-03-28 16:00:50.719 adding: localhost.localdomain as a client (events: 1)
0: start_time: 0.036 duration: 9.928
1: start_time: 0.026 duration: 9.901
stream: start_time: 0.289 duration: 110.421 bitrate=4579 kb/s
2007-03-28 16:00:54.012 AFD: Opened codec 0xa111a50, id(MPEG2VIDEO) type(Video)
2007-03-28 16:00:56.472 AFD: Opened codec 0xa111e50, id(MP2) type(Audio)
2007-03-28 16:05:04.019 TFW, Error: Write() -- IOBOUND begin cnt(2048)
free(2047)
2007-03-28 16:05:04.987 TFW, Error: Write() -- IOBOUND end
2007-03-28 16:10:04.829
RingBuf(/videos/record/1021_20070328155900.mpg): Taking too long to be
allowed to read..
2007-03-28 16:10:59.811 TFW, Error: Write() -- IOBOUND begin cnt(2048)
free(2047)
2007-03-28 16:11:02.629 TFW, Error: Write() -- IOBOUND end
2007-03-28 16:11:03.559 TFW, Error: Write() -- IOBOUND begin cnt(2048)
free(2047)
2007-03-28 16:11:05.149 TFW, Error: Write() -- IOBOUND end



crontabs for root and mythtv users:

[root at localhost mythtv]# crontab -l
08 10  * * * /root/sync_docs >/dev/null
04 05,13 * * * /usr/local/orca/bin/orca -o
/usr/local/orca/etc/procallator.cfg >/dev/null
[root at localhost mythtv]# crontab -u mythtv -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.21706 installed on Sun Mar 13 21:23:10 2005)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)

### Run mythfilldatabase every day at some random time after 1:30pm
#
# UPDATE: This is now controlled via the mythtv application, where
Zap2it suggests a download time.
#
#30 13 * * * sleep $(expr $RANDOM \% 14400) && mythfilldatabase >
/var/log/mythtv/mythfilldatabase.log 2>&1


#### MySQL backup

0 11 * * * /home/mythtv/mythbackup

#### Optimize mythtv database

0 10 * * * perl /home/mythtv/optimize_mythdb.pl >/dev/null

#### Check to make sure MythTV is up and running
15,30,45,00 * * * * /home/mythtv/chk_myth

## Setup readable filename links to Mythtv recordings

59 11 * * * perl /usr/share/doc/mythtv-0.20/contrib/mythrename.pl
--verbose --link >/dev/null

#### TV Wish

0 18 * * * sh /home/mythtv/tvwish/personal/runwish


More information about the mythtv-users mailing list