[mythtv-users] Experimenting with TFW_DEF_BUF_SIZE to minimize HDTV IOBOUND errors

Mudit Wahal mwahal at gmail.com
Sun Feb 19 10:42:34 UTC 2006

Seems like this issue is more common with HD sources as the demand for
IO increases by a factor 5 vs SD. Adding multiple HD sources, compound
the issue.

Surprisingly, very few people see this issue. I think there are more
instances but no one is looking into their log files and take the
*glitches* as part of HD.

I think the devs can provide a menu/config option for these 3
variables with big disclaimer.
I only modified the first to 64mb and I'm very happy with results.
Whenever I upgrade to 0.19, I've to do the same.

On 2/18/06, Yeechang Lee <ylee at pobox.com> wrote:
> [Apologies if this belongs on mythtv-dev@, but I don't subscribe to
> that list as I'm not really a coder--as my message will make
> clear--and I know developers read mythtv-users at .]
> I've been working on ways to minimize the IOBOUND errors that have
> bedeviled my HDTV recordings since I started using 0.18 two months
> ago. (See
> <URL:http://www.gossamer-threads.com/lists/mythtv/users/175520?search_string=yeechang%20iobound;#175520>
> and
> <URL:http://www.gossamer-threads.com/lists/mythtv/users/174982#174982>,
> among others, for some previous reports.) I'd hoped 0.19 would have
> helped, but as far as I can it didn't.
> My setup:
> * Frontend/backend: 3.0GHz Hyperthreaded Pentium 4 with 512MB running
> Fedora Core 4 and MythTV 0.19 from ATrpms
> * Program sources: Two Motorola DCT-6200 boxes through FireWire
> (One point-to-point and one broadcast, both at 200Mbps) and a HD5000
> ATSC card.
> * MythTV storage: Infrant ReadyNAS 600 gigabit Ethernet-capable NAS in
> ext3 [1] over RAID 0, mounted via CIFS [2].
> * Network: D-Link PCI Express gigabit Ethernet card and SMC gigabit
> Ethernet switch .
> After reading
> <URL:http://www.gossamer-threads.com/lists/mythtv/dev/139332>, I
> downloaded the ATrpms MythTV source RPM, unpacked the tarball, and
> began fiddling with libs/libmythtv/ThreadedFileWriter.cpp. The key
> lines are:
> const uint ThreadedFileWriter::TFW_DEF_BUF_SIZE   = 2*1024*1024;
> const uint ThreadedFileWriter::TFW_MAX_WRITE_SIZE = TFW_DEF_BUF_SIZE / 4;
> const uint ThreadedFileWriter::TFW_MIN_WRITE_SIZE = TFW_DEF_BUF_SIZE / 8;
> (Read the above, shown as it appears in the 0.19 source code, as
> 2-4-8.)
> To experiment without unduly upsetting my MythTV setup I repacked the
> tarball, rebuilt the source RPM, rebuilt the binary RPMs, then
> installed only the new libmyth RPM.
> Since nothing succeeds like excess, I first tried 64-4-8. This seemed
> to work quite well when recording and playing back two FireWire
> streams. However, adding the ATSC stream as a third or second (and,
> I'm pretty sure, only) recording would consistently in under ten
> seconds 1) generate an IOBOUND begin error (without, ominously, a
> corresponding IOBOUND end error as is typical) and 2) hang the
> backend. 64-8-16 ran into the same issue. By contrast, 64-12-24 (and,
> I think, 64-16-32) did *not* hang with ATSC, but I saw IOBOUND errors
> with just two recordings. Chastened, I next tried 16-4-8. Again no
> ATSC hang, but I saw IOBOUND errors with playback plus three
> recordings.
> With my current setup, 32-12-24, I *can* reliably record three sources
> at once as long as I don't try any form of playback (even the preview
> clips in 'Watch Recordings'); any playback results in some IOBOUND
> errors (And, is it just me, or are the preview clips more
> disk-intensive than actually playing back the shows themselves?). I
> *can* also do playback plus two recordings (regardless of source)
> reliably. Most interestingly, I can *also* delete recordings (I've
> done up to 5GB so far) without causing IOBOUND errors, something that
> formerly was guaranteed in any recording scenario whatsoever with any
> file larger than a few hundred MB.
> I suspect there indeed is some "right combination" of numbers that
> will deliver what I want--being able to reliably do playback plus all
> three recordings--but as the ATSC card is only used a few times a week
> it's not *that* a big deal (and, as noted, I can apparently merely
> avoid playback in order to capture pristine recordings). I'm burnt out
> on the whole editing+rebuilding+installation rigamarole for now (so
> didn't try many obvious combinations, such as other 32-x-y variants),
> but hopefully this will inspire another to take up the torch.
> [1] Yes, I'd prefer this to be JFS or XFS, but that's not available
> with Infrant's firmware and may never be.
> [2] Please see
> <URL:http://www.gossamer-threads.com/lists/mythtv/users/169825> for
> why I don't use NFS.
> --
> Yeechang Lee <ylee at pobox.com> | +1 650 776 7763 | San Francisco CA US
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

More information about the mythtv-users mailing list