I agree that a condescending tone is unnecessary in this forum.  It also appears that some participants attempt to obfuscate the situation rather than offer clear, direct advice.  All I (we) need is a little guidance from those who understand how this
thing is designed (and therefore understand its flaws).&nbsp; <br><br>Assuming the BUSQ is executed by the BE and not the FE, I don&#39;t understand why a FE action (i.e., my attempt to navigate through the recordings menu following a delete) would hang
if a BE action (i.e., rescheduler) is triggered to perform a task (i.e.,
BUSQ).&nbsp; Aren&#39;t these things running independently and asynchronously?&nbsp;&nbsp; Unless they are
somehow locking each other inside the database, I wonder why they are affecting each other.&nbsp;&nbsp; I come from a Sybase/Oracle point of view on this, but I suppose it is possible that the BUSQ could be holding share locks that prevent another database transaction from acquiring exclusive locks necessary for an update/delete.&nbsp; But I am not sure what this could be given the use-case in question here.&nbsp; Is it possible that something else is blocking the FE action apart from the BUSQ?&nbsp; Could the BUSQ be a red herring?
<br><br>FYI, I enabled slow deletes and so far I am not convinced it has helped any.&nbsp; This was a useful suggestion that perhaps I dismissed prematurely.&nbsp; <br><br>Several people have suggested we convert the recordedseek
table to innoDB, but that table does not participate in the BUSQ.&nbsp; Further, this table has never shown up in my slow-sql log, nor have I seen any evidence that the BUSQ (or any other query) is blocked by another database activity using the recordedseek
table.&nbsp; The BUSQ consistently runs in 7 seconds, even if I run it ad-hoc when nothing else is going on.&nbsp;  I remain puzzled as to how the recordedseek
table could be a factor.&nbsp; Additionally, I know that making changes to the schema *can* break future upgrades, so I am reluctant to do this unless it is absolutely necessary.&nbsp; Is this innoDB change one that could break the next upgrade?&nbsp; I suppose if it is, I could just convert it back and then do the upgrade....
<br><br>Larry<br><br><div><span class="gmail_quote">On 11/30/07, <b class="gmail_sendername"><a href="mailto:f-myth-users@media.mit.edu">f-myth-users@media.mit.edu</a></b> &lt;<a href="mailto:f-myth-users@media.mit.edu">f-myth-users@media.mit.edu
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&nbsp;&nbsp;&nbsp;&nbsp;Date: Thu, 29 Nov 2007 21:38:39 -0500<br>&nbsp;&nbsp;&nbsp;&nbsp;From: &quot;Michael T. Dean&quot; &lt;
<a href="mailto:mtdean@thirdcontact.com">mtdean@thirdcontact.com</a>&gt;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; On 11/29/2007 07:55 PM, David Rees wrote:<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt; On Nov 29, 2007 4:41 PM, Michael T. Dean &lt;<a href="mailto:mtdean@thirdcontact.com">
mtdean@thirdcontact.com</a>&gt; wrote:<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt;&gt;&gt;&nbsp;&nbsp; It is very frustrating to<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt;&gt;&gt; sit and wait up to 10 seconds after every delete (from either the frontend<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt;&gt;&gt; or mythweb).
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt;&gt;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt;&gt;&gt; I am open to suggestions as to how I can improve this situation.<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt;&gt;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt;&gt; Do you have your MySQL database on the same drive as your recording
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt;&gt; disk?&nbsp;&nbsp;If so, that&#39;s the first thing you should consider fixing.<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt; It is completely unreasonable to expect someone to have a multiple<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt; disk system to get decent usability from MythTV.
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; IMHO, it is completely unreasonable to expect Myth to be able to make<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; your kernel/filesystem driver/hardware be able to do something that your<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; kernel/filesystem driver/hardware is unable to do.
<br><br>It is also completely unreasonable for you to ignore and dismiss all<br>the evidence people are handing you that RESCHEDULES ARE SLOW even<br>if one has ARLEADY DONE all of the recommended screwing around.<br><br>
(Ignore the red herring of &quot;deletions&quot; for the moment, just to<br>simplify the discussion---the only relevant point there is that<br>deletions force a reschedule.)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt;&nbsp;&nbsp;I would venture to<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt; guess that the number of single disk systems far outnumber the number
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; &gt; of multi-disk systems<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; You do realize that Myth uses a /lot/ of storage space, right?<br><br>You do realize that an increasing number of people are starting to<br>call you on your condescending attitude, right?
<br><br>(You&#39;re not always that way, and you&#39;re often helpful.&nbsp;&nbsp;But you&#39;re<br>also quite often a determined Pollyanna and/or apologist for the<br>status quo, insisting that -all- user complaints -must- be because the
<br>-user- is somehow confused and that Myth itself must be perfect.&nbsp;&nbsp;Just<br>because many users -are- confused is no reason to assume (or insist)<br>that they -all- are.&nbsp;&nbsp;I&#39;ve gritted my teeth, grumbled to myself, and
<br>kept quiet when you&#39;ve done this, but recent traffic in other threads<br>shows that others are starting to come out and say it.)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do you
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; really think someone buys a new 750GB hard drive, then throws away the<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; 300GB hard drive she was using for Myth?&nbsp;&nbsp;Or buys a 300GB hard drive and<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; throws away the old 80GB hard drive?&nbsp;&nbsp;You do realize that most (all?)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; motherboards come with more than one disk connector, right?<br><br>Every additional disk---even if the disk itself is &quot;free&quot;---adds heat,<br>noise, and power cost; reduces reliability and the ability to add any
<br>-more- disks (due to using up both space and bus connectors); and<br>complicates the machine&#39;s configuration.<br><br>Many people are unwilling to make those sorts of sacrifices for what<br>looks, at the heart of it, to be poor implementation; many others
<br>-cannot- make that sacrifice if their backend is limited in, e.g.,<br>physical size.<br><br>And besides, as my evidence has shown, putting the DB on a separate<br>spindle doesn&#39;t help significantly.&nbsp;&nbsp;It is NOT, repeat NOT, any sort
<br>of contention for where the disk head is hanging out, unless you count<br>the contention that MySQL is imposing on ITSELF by executing its queries.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; Also, you do realize that MySQL is a /network-capable/ database
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; management system, right?&nbsp;&nbsp;You don&#39;t even have to put MySQL on either<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; backend.&nbsp;&nbsp;It could be on the dedicated frontend.&nbsp;&nbsp;It could be on another<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; computer somewhere in the house. ...<br>
<br>...adding even -more- heat, power, space, and unreliability, unless<br>the machine was already in use---in which case it just adds unreliability<br>and makes it more complicated to take that machine---or any intervening
<br>piece of network hardware--- down for any reason (lest you break Myth&#39;s<br>ability to do -anything- while it&#39;s down).<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; Fine.&nbsp;&nbsp;I really couldn&#39;t care less what he does first.&nbsp;&nbsp;But my point is
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; that he should be trying to fix the MySQL configuration,<br><br>And how -exactly- do you recommend that he do that, besides putting it<br>on a second spindle that he may not have?&nbsp;&nbsp;And how would you recommend
<br>I fix -my- configuration, given all the info I&#39;ve given you in previous<br>threads about all the things I&#39;ve tried with marginal or zero benefit?<br>Replies of the form &quot;don&#39;t keep so much history&quot;, &quot;have fewer channels&quot;,
<br>&quot;you can&#39;t use even one any-channel rule&quot;, and so forth are not going<br>to get a good reception, since all of those are things Myth is supposed<br>to handle well.<br><br>There are three fundamental problems here.&nbsp;&nbsp;Solving any of them would
<br>solve the whole mess:<br>(a) The BUSQ has very poor performance for some people.<br>(b) Large portions of Myth hang completely waiting for the BUSQ.<br>(c) Common UI tasks, such as deletion or scheduling, run the BUSQ.
<br><br>I frankly think that (b) might be the most tractable, because it<br>-might- be easier to separate out the BUSQ into another thread and/or<br>refactor the schema to avoid weird crosslocking of tables, than it<br>might be to change either (a) or (c).&nbsp;&nbsp;But that&#39;s just a guess.
<br><br>[If it were up to me, I&#39;d have solved (a) by implementing a<br>truth-maintenance system to do scheduling, rather than by building<br>unwieldy DB queries, but since the chances of -that- making it into<br>Myth are zero I&#39;m not going to waste any time on it.&nbsp;&nbsp;The current DB
<br>approach is something of a travesty because it has to redo -all- of<br>its work on -every- reschedule, as if it&#39;s coming into the world<br>brand-new with no prior knowledge; a TMS has the great advantage that<br>reasonable changes cause small propagations and are very fast; they
<br>even have the advantage that explaining -why- something was or wasn&#39;t<br>scheduled in some way can be derived by traversing the structure and<br>generating the explanation, which is something that can only be<br>crudely approximated with the current DB-based approach.]
<br><br>And of course there&#39;s also:<br>(d) The BUSQ seems to increase some sort of window of vulnerability<br>&nbsp;&nbsp;&nbsp;&nbsp;to timing races that can crash the backend if it&#39;s accessed by<br>&nbsp;&nbsp;&nbsp;&nbsp;something else<br>...which isn&#39;t a performance problem so much as evidence that there&#39;s
<br>something screwy going on in a mutex somewhere.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;not blaming the<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; BUSQ/arguing with me that the scheduler query is a problem when his<br>
<br>But others, like myself, are arguing that the BUSQ is a big problem<br>all by itself, and EVEN IF everything else about deletion was instantaneous,<br>we&#39;d still be seeing UI lockups and generally bad performance, because we
<br>-also- see them in contexts where no deletion is happening, e.g,. when<br>scheduling new shows via the UI, or when the BUSQ is running autonomously<br>because some recording has just finished on its own.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; system executes the query in the same amount of time as mine and my
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; system does /not/ have the &quot;entire system locks up when I try to delete<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; a recording&quot; issue his has.&nbsp;&nbsp;Also, it doesn&#39;t really help that he&#39;s<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; refusing to try slow deletes because he has a super-fast XFS filesystem
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; and he&#39;s smart enough to know that a slow delete (that will cause the<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; removal of recordedseek/recordedmarkup entries to be delayed about 2min<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; 10sec per GiB of recording) will have no effect on performance of his
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; deletes.<br><br>...or maybe he just can&#39;t believe that deleting a few thousand items<br>from a DB can take tens of seconds.&nbsp;&nbsp;I can&#39;t.&nbsp;&nbsp;If you&#39;re saying that<br>he has to defer that to some random time by using code designed to
<br>work around filesystems that have their own problems, just to cause<br>the DB update to happen at some indeterminate time in the future, I<br>can see why he might view this dubiously as a kluge (and, for that<br>matter, as something that could bite him when he least expects it,
<br>depending on when that actual DB update finally -does- happen).<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; In other words, my system seems--to me--to be proof that a system that<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; takes 6-7 seconds to execute the scheduling run does not lock up when a
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; recording is deleted.&nbsp;&nbsp;Perhaps I&#39;m just naive, though, in thinking my<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; system acts like a properly configured Myth system.&nbsp;&nbsp;Maybe I&#39;ve<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; misconfigured my system and gotten unreasonably good performance because
<br>&nbsp;&nbsp;&nbsp;&nbsp;&gt; of it.<br><br>Various devs commented that they, too, were seeing reschedule times<br>upwards of 30 seconds; there was a long thread with stats about that<br>back when the DB-vs-recording-glitches thing was playing out.&nbsp;&nbsp;I guess
<br>the devs&#39; systems are misconfigured, too.&nbsp;&nbsp;Maybe you should explain to<br>them the error of their ways, and perhaps it will enlighten us unwashed<br>masses, too.<br>_______________________________________________<br>
mythtv-users mailing list<br><a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br><a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
</a><br></blockquote></div><br>