[mythtv] Ideas: buffering, skipping, ionice

Richard Dale richard at interlink.com.au
Wed Nov 1 00:13:36 UTC 2006

Here's two ideas for MythTV:

1.	Huge buffers for playback (frontend)

When watching any recordings, is it possible to dedicate a portion of RAM,
say, 256MB to a (growable) circular buffer then the playback is done from
the buffer.  

With RAM being cheap, such a nice large buffer could overcome the
limitations of slow I/O.

Even the most extreme HDTV at 20Mbps (2.5MB/sec) would never have an issue
with I/O except perhaps at the start of playback before the buffer is

This buffer would also no doubt speed up skipping too.

Perhaps this buffering could also be implemented on the backend too, so we
have something like:
(Disk storage) -> (backend buffer) -> (frontend buffer) -> playback decoder
Where the backend and frontend share the same box, the duplicated buffer
area could be shared or eliminated.

2.	ionice (for backend)

Secondly, Linux kernels have an I/O Scheduler called CFQ which, since
2.6.13, has a facility called "ionice", allowing you to select a priority
for reading data from the disk.  Note that ionice has no effect on writes.
Perhaps the ionice could be increased when the buffer is low and reduced
when the (frontend) buffer is getting full.

Any thoughts?


More information about the mythtv-dev mailing list