[mythtv-users] Mythtv 0.24 Acer Revo ALSA WriteAudio buffer underruns

Alex Butcher mythlist at assursys.co.uk
Mon Mar 7 11:10:11 UTC 2011


On Sat, 5 Mar 2011, Brian J. Murrell wrote:

> On 11-03-05 12:35 PM, pnetherwood at email.com wrote:
>>
>> SELECT     c.chanid,         c.sourceid,           p.starttime,           p.endtime,        p.title,              p.subtitle,            p.description,    c.channum,            c.callsign,            c.name,           oldrecduplicate,      p.category,            record.recpriority, record.dupin,   recduplicate,          findduplicate,    record.type,        record.recordid,     p.starttime - INTERVAL record.startoffset     minute AS recstartts,     p.endtime + INTERVAL record.endoffset     minute AS recendts, p.previouslyshown,     record.recgroup, record.dupmethod,  c.commmethod,          capturecard.cardid, cardinput.cardinputid,p.seriesid,
>>   p.programid,      p.category_type,      p.airdate,             p.stars,          p.originalairdate,    record.inactive,     record.parentid, (CASE record.type   WHEN 6    THEN record.findid   WHEN 9    THEN to_days(date_sub(p.starttime, interval                 time_format(record.findtime, '%H:%i') hour_minute))   WHEN 10    THEN floor((to_days(date_sub(p.starttime, interval                time_format(record.findtime, '%H:%i') hour_minute)) -                record.findday)/7) * 7 + record.findday   WHEN 7    THEN record.findid   ELSE 0  END) , record.playgroup,    oldrecstatus.recstatus, oldrecstatus.reactivate,                                             p.videoprop+0,         p.subtitletypes+0, p.audioprop+0,   record.storagegroup,     capturecard.hostname, recordmatch.oldrecstatus,                                            record.avg_delay, c.recpriority + cardinput.recpriority + (cardinput.cardinputid = record.prefinput) * 2 AS powerpriority
>> FROM recordmatch
>> INNER JOIN record ON (recordmatch.recordid = record.recordid)
>> INNER JOIN program AS p ON ( recordmatch.chanid    = p.chanid    AND      recordmatch.starttime = p.starttime AND recordmatch.manualid  = p.manualid )
>> INNER JOIN channel AS c ON ( c.chanid = p.chanid )
>> INNER JOIN cardinput ON (c.sourceid = cardinput.sourceid)
>> INNER JOIN capturecard ON (capturecard.cardid = cardinput.cardid) LEFT JOIN oldrecorded as oldrecstatus ON ( oldrecstatus.station   = c.callsign  AND      oldrecstatus.starttime = p.starttime AND      oldrecstatus.title     = p.title )
>> WHERE p.endtime >= NOW() - INTERVAL 1 DAY ORDER BY record.recordid DESC;
>
> That's quite the query.  On my backend it returns 3837 rows.
>
>> I'd be very interested how long the query takes to run on other peoples machines.
>
> 5.5 seconds from a remote client, and that's after having run it a few
> times, so that with hot caches.  It tooks 6s a few hours later.

0.429s to 0.447s here, from a clean start of mysqld, but with the kernel
buffer cache probably being preloaded from previous runs.

time mysql --password="MYPASSWORD" <~mythtv/sql.txt >/dev/null

The query returns about 3589 rows on my backend.

>> Mine takes on average over 3 seconds.
>
> You can see, mine is a whole lot longer than 3 seconds.  I don't have
> any illusions that I have a terribly fast backend though.  AMD
> Athlon(tm) XP 2800+, 1GB memory.  Mysql database is on a FUJITSU
> MPF3153AT which hdparm reports has delivering 23MB/s.

i5-760, 4GB memory, MySQL database on an LVM LV on top of a md RAID1 array
built from partitions on two WD WD2001FASS discs. hdparm reports 122.7MB/s
for the array.

--- /etc/my.cnf.fedora  2011-01-03 09:54:55.478328994 +0000
+++ /etc/my.cnf 2011-01-03 09:55:14.398031384 +0000
@@ -1,4 +1,10 @@
  [mysqld]
+key_buffer = 16M
+table_cache = 128
+sort_buffer_size = 2M
+myisam_sort_buffer_size = 8M
+query_cache_size = 16M
+
  datadir=/var/lib/mysql
  socket=/var/lib/mysql/mysql.sock
  user=mysql

>> I do have 8 tv tuner cards (4 with multirec)
>
> I have 5.  4 analog and one digital with 3 multirecs.

3 DVB-T tuners with 4 multirec virtual tuners on each, giving a total of 12
virtual tuners.

> b.

Best Regards,
Alex


More information about the mythtv-users mailing list