[mythtv] Loud hard drive due to NuppelVideoRecorder.cpp sync()

Isaac Richards ijr at po.cwru.edu
Fri Jun 13 12:48:18 EDT 2003


On Friday 13 June 2003 01:25 am, Sam N. Max (snx) wrote:
> Perhaps an option could be added to allow the user to specify whether
> sync() should be called.  I'm not sure about other users experiences, but
> it might make sense to not have it all (or default off).  If it used, there
> might be some gain in encoding speed by moving the call to sync into
> another thread, though that may prove useless.

The main issue is that quite a few versions of the kernel _don't_ write 
in-memory buffers to disk in a timely fashion.  Without the sync() there, 
I've seen it spool up several hundred MB in to to-write-to-disk buffer, then 
decide to dump it all to disk all at once, causing a lot of frame drops, etc.  
Not good. =)

> One final thought.  Many people seem to have noticed a slow down with
> version 0.9 (for now I've been sticking with 0.8).  I haven't fiddled with
> it yet, but I was wonderring if the "position map" database write that
> occurs every key frame may be the culprit (it comes right after the sync()
> call in NuppelVideoRecorder.cpp).  There's also the call to the somewhat
> kludgy looking "KickDatabase" function which I'm not totally sure about...

That's every 15 keyframes, which is every 15 seconds or so.  Shouldn't be an 
issue.  KickDatabase is to ensure that the database connection is alive -- 
the mysql client library doesn't retry a query if the connection has become 
disconnected for whatever reason.

Isaac


More information about the mythtv-dev mailing list