[mythtv] HD3000 buffer overrun solution - patches for hdtvrecorder.cpp/.h against mythtv 0.16

Brandon Beattie brandon+myth at linuxis.us
Tue Dec 7 18:22:22 UTC 2004


On Mon, Dec 06, 2004 at 07:11:14PM -0500, Taylor Jacob wrote:
> Maybe I am missing somthing here.. But how in the world does this problem exist?
>   Raw TS from ATSC is 19.39 megabit.. 3 of them would be ~60 megabit ~=  7.5
> megabytes a second..  Even a rotten 5400 rpm drive can sustain writes over
> that..
> 
> Taylor

A drive can sustain that at times, but not always.  If you are writing a
single file and the head of the driver does not have to move except
where it's writing then it's easy to get that speed.  Once you add 3
streams being saved to different possitions on the disk you loose a lot
of throughput in the head of the drive moving.  If you're reading a show
from disk you're possibly moving the head quite a ways.  If you're
accessing other data randomly from the disk for whatever reason, .. you
get the point.  So writing data is a problem.  -- And it's not always
the disk.

What I personally see is on AMD XP mainboards, you
sometimes can max out the system bus.  Each tuner card dumps a 45mb/s
stream (This can be fixed in the driver, to only send a single stream,
instead of the entire ATSC stream for a channel, so 4.5mb-19.4mb.  Some
quick math is 150mb/s of data from the 3 tuner cards, another 60mb being
written to disk, if you're watching a show that's another 20+20mb.  In the
end it starts to add up, and I have had dozens problems that I can track
back to maxing out my system bus (And from what I can see, AGP often
gets preference to pci, which is another problem).  I have a raid 0 with
5 drives and can write about 60MB/s.  I still see many buffer problems,
and disk speed is not the problem.  

Food for though.

--Brandon


More information about the mythtv-dev mailing list