
mtdean at thirdcontact
Mar 21, 2012, 9:45 AM
Views: 161
Permalink
|
|
Crazy slow MySQL (was Re: [mythtv-commits] Ticket #10482: Marking episode first/last showings performance)
|
|
On 03/20/2012 04:46 PM, MythTV wrote: > #10482: Marking episode first/last showings performance > -------------------------------------------+--------------------- > Reporter: sfkoch@… | Owner: stuartm > Type: Patch - Feature | Status: new > Priority: minor | Milestone: unknown > Component: MythTV - Mythfilldatabase | Version: 0.24.2 > Severity: medium | Keywords: > Ticket locked: 0 | > -------------------------------------------+--------------------- > Mythfilldatabase's "Marking episode first showings" and "Marking episode > last showings" steps take a combined 21+ minutes on my backend server. > After attempting MySQL and filesystem tuning with no success, I cut the > updates down to 5 seconds by modifying mythfilldatabase's queries to > update in bulk rather than row-by-row. > > Excerpts from mythfilldatabase output: > > {{{ > 2012-03-20 13:02:56.902 Marking episode first showings. > 2012-03-20 13:13:45.289 Found 34235 > 2012-03-20 13:13:45.289 Marking episode last showings. > 2012-03-20 13:24:32.696 Found 34235 > > 2012-03-20 14:21:44.732 Marking episode first showings. > 2012-03-20 14:21:47.397 Found 65336 > 2012-03-20 14:21:47.397 Marking episode last showings. > 2012-03-20 14:21:50.457 Found 64918 > }}} > > Besides the performance improvement, the "Found" number is changed to the > actual number of programs marked instead of the number of unique programs. > The number marked is higher than the unique count because of duplicate > channels (non-HD and HD variants, Comcast in the middle of a massive > renumbering). > > I will submit a git pull request shortly. FWIW, the problem with your MySQL server (which is still a problem, and may have serious effects elsewhere when MythTV attempts to use data from MySQL) is almost definitely that you are running mysqld with your MySQL data stored on an ext4 (or ext3--or other) file system with barriers enabled and it's asking too much of your system (as it would be for most systems). Note that I'm not saying to disable barriers, but you should read some of the threads about it (and/or read about it on the kernel mailing lists) http://www.gossamer-threads.com/lists/engine?list=mythtv&do=search_results&search_forum=all&search_string=ext4+barriers&search_type=AND&search_fields=sb&search_time=&search_user_username=&sb=post_time&mh=25 That said, thanks for the patch. Mike _______________________________________________ mythtv-users mailing list mythtv-users [at] mythtv http://www.mythtv.org/mailman/listinfo/mythtv-users
|