[mythtv-users] High disk activity

Michael T. Dean mtdean at thirdcontact.com
Mon Dec 10 21:45:49 UTC 2007


On 12/10/2007 01:52 PM, Wolfgang Grunewald wrote:
> Phil Bridges wrote:
>> On Dec 10, 2007 10:44 AM, Wolfgang Grunewald <wmgrunewald at web.de> wrote:
>>> Sure, the "cat to disk while playing with mplayer" method also
>>> is reading and writing.
>>>       
>> This isn't reading as well, is it?
> mplayer

thinks it

>  is reading from my harddisk:
>   

thanks to the kernel's in-memory disk cache making access to the
buffered data work exactly as if MPlayer were accessing the file.

> xterm1: cat /dev/dvb/adapter0/dvr0 > stream.ts
> xterm2: mplayer -fs stream.ts
>
> You can try it on your box. On my box, there's heavy writing (!)
> activity with MythTV. When I stop the mythbackend and invoke
> the two commands above, it's gone.

For a better test:
cat /dev/dvb/adapter0/dvr0 > stream.ts & ; sleep 60 && mplayer -fs
stream.ts

Where the number of seconds you sleep must be adjusted appropriately to
ensure that the data MPlayer reads is truly coming from the disk. 
Depending on your available memory, it may only need to be a few seconds.

And, really, you shouldn't be using cat, but should instead use dd, i.e.:

dd if=/dev/dvb/adapter0/dvr0 of=stream.ts

and--for the best test--should use block sizes adjusted to provide
buffer sizes that make the usage pattern more similar to what's
occurring with Myth.

Mike


More information about the mythtv-users mailing list