[mythtv-users] High mysql cpu usage

Jarle Thorsen jarlethorsen at gmail.com
Mon Jan 7 19:36:18 UTC 2013


2013/1/6 Michael T. Dean <mtdean at thirdcontact.com>

> On 01/06/2013 02:01 PM, Jarle Thorsen wrote:
>
>> I have now gone through all my channels manually and removed any channel
>> that I was not able to tune in to. I now have about 400 channels, all with
>> EIT enabled.
>>
>> Every time I see the following in my backend log:
>>
>>  2013-01-06 19:44:36.559637 I [19447/19514] Scheduler scheduler.cpp:2129
>> (HandleReschedule) - Reschedule requested for MATCH 0 0 0 - EITScanner
>> <snip>
>> 2013-01-06 19:46:19.206036 I [19447/19514] Scheduler scheduler.cpp:2242
>> (HandleReschedule) - Scheduled 304 items in 102.0 = 100.30 match + 0.35
>> check + 1.39 place
>>
>
> That's terribly bad performance.  Your scheduler query should run in a few
> seconds.  Yours is taking > 100s.
>
> Scheduler performance depends on (in addition to hardware resources--CPU
> and RAM--and file system--not blocking when MySQL is trying to write (due
> to I/O wait or things like barriers blocking until data is on the platter,
> versus the disk cache)) number of programs in the listings (which, itself,
> is generally affected by the number of channels), number of recording rules
> (which may match some of those programs in the listings), and number of
> shows in recording history.
>
> That said, this performance (unless you're running MySQL on an Atom or a
> PogoPlug or similar--which just isn't enough for a large, cable-sized
> system, especially if you're using EIT) is bad enough it's almost
> definitely not your rules/history.  I have 17831 shows in my recorded
> history, 119 recording rules, but only 35 channels, and my system gives:
>
> Scheduled 517 items in 1.3 = 0.00 match + 1.25 place
>
> (2 orders of magnitude faster than your system).  Therefore, I'd suggest
> you should look at other things.  What CPU and how much RAM do you have?
>  What file system are you using?  What mount options?  Do you have MySQL on
> the same file system (really bad) or disk (not ideal) as your recordings?


My machine is an Intel(R) Core(TM)2 Duo CPU     E6750  @ 2.66GHz with 3GB
RAM (only 2GB used at the moment). My root filesystem and MySQL db is
running on a separate disk with ext3 filesystem. Storage is all running on
separate disks with xfs filesystem.

The oldrecorded table contains 12531 entries, and the record table contains
189 entries.

I noticed that my root ext3 filesystem was mounted with relatime, remounted
it with noatime, but this did not seem to help.

Suggestions for further settings to check are appreciated.

-- 
Jarle Thorsen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130107/fd014f66/attachment.html>


More information about the mythtv-users mailing list