[mythtv] innodb vs myism preformance

Daniel Manjarres danmanj at gmail.com
Sat Feb 19 21:14:53 UTC 2005


On Fri, 18 Feb 2005 23:54:15 -0500 (EST), Chris Pinkham
<cpinkham at bc2va.org> wrote:
> The scheduler does I believe.  I mentioned that the delete thread
> signals the scheduler which may in turn hit the oldrecorded table.

Ok, to give you even more information I have found 2 more cases where
it appears that database resource locks are sucking [hard]. These
happen regardless of innodb or MYISAM. To avoid confusion: my system
is dual opteron, so 100% cpu means 100% of one of the CPUs.

1) deleting a recording in progress: Accorrding to top(1) mysqld jumps
to 100% CPU usage while the frontend sits there not repainting the
screen. This takes 8-10 seconds to finish.

2) re-activating a recording that was deleted using above procedure by
going to "watch tv" and pressing the 'r' key: same deal, mysqld jumps
to 100% CPU usage, and the frontend stops responding for several
seconds.

sqrt[-1]) trying to use "r" to record a different program being viewed
while the above crap is going on (this really bothers me personally).
In this case the horrible scenario is: you are watching a recording in
progress, realize there's another show you would rather watch, cancel
the in-progress one, switch to watching the better show, realize it's
your favorite episode and want to record it, press 'r', and then the
frontend sits there for 30 seconds playing the current video stream,
but not responding to any input while mysqld gets 100% cpu usage, the
best part goes by, and finally in the middle of the next commercial
block the backend finally gets around to putting the video into a file
instead of the ringbuffer. This is probably the same code path as #2
(or maybe #1 folowed by #2, I dunno), just more annoying.

What I think is happening is a resource lock inside the database
prevents a query from the frontend from completing until another
process/thread (the scheduler???) gets it's act together, and if a
thread in the backend does a similar query all hell breaks loose. I am
of the opinion that using implicit sleep()s to allow other parts of
the myth system to get access to the db is just too big of a hack to
work for all cases, but I can always be wrong. In any case I ain't
going to be able to fix it so I won't complain too much.

HTH
Daniel Manjarres


More information about the mythtv-dev mailing list