[mythtv-users] Experimenting with TFW_DEF_BUF_SIZE to minimize HDTVIOBOUND errors

James C. Dastrup jc at dastrup.com
Mon Feb 20 22:23:18 UTC 2006


>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
>econds 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.
>

Curious, are the IOBOUND errors actually causing problems, or are you just
obsessed with getting rid of them? I rarely see them, but when I do, I don't
notice any problems with the video stream.
 
3 recordings during playback may just need a better system than what you have.
I have NFS and JFS software RAID 5 storage on ATA 133 over gigabit. Two 
HD tuners, 1 SD tuner. I don't have any problems [1]. You seem to have much worse 
luck than I do. Possibly because I use JFS and NFS? You may want better 
hardware, like SCSI RAID with Battery-Backed Cache over as many spindles 
as possible.

If upgrading your hardware isn't an option, maybe change your TV viewing habits? :-)
 
[1] No problems, unless I turn on commercial flagging, transcoding or anything else.
If anything like that is running, then I see problems in the video stream.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 8010 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20060220/32ecd8be/attachment.bin 


More information about the mythtv-users mailing list