[mythtv-users] The purpose of a Secondary Backend is...

Roger Heflin rogerheflin at gmail.com
Fri Jun 20 16:38:10 UTC 2008


Jay R. Ashworth wrote:
> On Thu, Jun 19, 2008 at 07:55:08PM -0700, Brad DerManouelian wrote:
>> You can in fact run the database on ANY machine on your network. MySQL  
>> is a server/client application. It doesn't matter where the server is  
>> as long as the client can connect to it. You can run your database on  
>> another continent and it wouldn't matter as long as permissions were  
>> set up correctly and you didn't mind waiting a long time for database  
>> queries. :)
> 
> Now, with 75% more hyperbole!
> 
> Seriously, though, is there in fact a maximum latency on the DBMS
> beyond which Myth simply won't work properly?  Has anyone ever checked?


Depends on how one defines work properly, databases should almost always work 
properly so long as things don't take the DB's timeout to complete a single 
operation.   The response will at some point in time get unacceptably slow.

Assume that it takes say 100 DB request operations for a given task to be done, 
locally that will mean <2 ms per reqeust, so .2 a second at worst for all 100 
tasks to finish.    Assuming things are on the end of a 20ms connection then 
that will mean everything takes 10 times as long (or 2.5 seconds).   Things will 
get unusable slow before you hit the actual timeout for a single one of the 100 
operations, say if the timeout for a single operation were 5 seconds once it 
starts taking just 1 second per request it takes 100 seconds to complete that 
task that requires 100 DB requests, so likely it is now unusably slow.

Now if a given task has more than 100 operations then things get worse, and 
local responses are likely faster than 2ms so things are likely don't look as 
bad as they would really be, and remote responses could be better or worse than 
20ms.

I have seen an application that was relocated to a shared data center, locally 
it took 2-5 seconds to start up (local machine, local sql over network), on the 
other end of a wan line (local machine, remote SQL over wan) it took over 30 
minutes just to complete the SQL requests needed to start the application.   Not 
exactly usable response, and each of the requests were nowhere near to timing 
out, but the application was unusable.

A number of things (like SQL) serialize their operations, so they don't request 
the next piece until the last piece has been received, and this is really ugly 
on high latency lines....

                               Roger


More information about the mythtv-users mailing list