[mythtv] skippy video on I/O bound machine

Isaac Richards mythtv-dev@snowman.net
Sun, 27 Oct 2002 00:34:59 -0400

On Sunday 27 October 2002 04:56 pm, John Coiner wrote:
> The NuppelVideoRecorder maintains a buffer of 40 frames. One thread
> copies frames from the capture device into this buffer; another thread
> empties the buffer by compressing each frame and storing it to the disk.
> The second thread will skip the compression step if the buffer is
> getting full. On a CPU bound machine, this helps to empty the buffer
> faster. However, on an I/O bound machine, this makes the situation much
> worse, b/c more data must be stored (and later retrieved by the play
> thread).
> On my machine, it doesn't get into non-compressing mode very often --
> it's something like 1% of frames that don't get compressed. However,
> sometimes (maybe due to another process accessing the disk heavily) it
> gets into a mode where a bunch of frames in a row aren't compressed, and
> then the machine really becomes I/O bound. The buffer never empties, all
> following frames are not compressed, and everything goes very slow.
> What is the best way to handle this? There could be a setting like
> "SlowIO=1" for those of us with older, lousier hard disks, that would
> force the recorder to always compress. Alternatively, we could remove
> the non-compressing mode altogether.
> Let me know if the 'SlowIO' setting sounds good and I can add it. thanks.

Yeah, a setting like that's probably the best way to do it, or maybe set a max 
# of non-compressed frames in a given time period or something?