[mythtv-users] Howto prevent MythTV flushing/Syncing disk writes (LiveTV/Recordings)

Roger Heflin rogerheflin at gmail.com
Tue Mar 18 15:12:07 UTC 2008


Albert Graham wrote:
> Hello,
> 
> Does anyone know how to prevent MythTV from flushing/syncing every single write request when watching LiveTV or 
> recording something.
> 
> My machine has lots of memory and very large fast disks, so I would prefer writes to occur in much larger chunks and a 
> lot less often, rather than every 3 or so MB.
> 
> 
> I've set my /proc/sys/vm as follows:
> 
> dirty_ratio = 90
> dirty_background_ratio = 90
> dirty_expire_centisecs = 10000
> dirty_writeback_centisecs = 0
> vfs_cache_pressure = 100
> swappiness = 60
> 
> But even after droping the caches, (so all memory is free) with drop_caches = 3, it seems to bypass the Linux caching.
> 
> I'm using XFS over an 8 disk (7TB) hardware raid5 array (3ware 9650SE) and my write speeds are >625MB/s - uncached, so I 
> would really like to see only a major write every 10/15 minutes, rather than the disks hammering away all day long.
> 
> Any help would be very very much appreciated.
> 
> Albert.

Even if there are no sync calls in the application, Linux will write the data as 
soon as is reasonable, it won't hold off a huge amount of data for a really long 
time unless you force it to by having the input IO rate exceed the disk IO rate, 
and then it will always be behind, and always write as much data as it can.

For mythtv to do this, it would have to buffer things up itself and only write 
every so often, and the disadvantages of this are it takes a lot of memory, and 
more data would be lost on a unexpected crash and it would take longer to 
shutdown things (the application buffers would have to be flushed--or lost), and 
for most people which less capable disk subsystems it would be rather useless.

You could probably make a patch to define a configurable disk buffer setup to do 
this, but it is not going to help anything.

What do you thing you are going to gain by only writing every 10-15 minutes?

                         Roger
                              Roger


More information about the mythtv-users mailing list