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

Frosty mythtv-users at stalks.nooblet.org
Tue Mar 18 15:19:46 UTC 2008


Roger Heflin wrote:
> 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?
>
>   

To have 8 drives continuously writing many times a second puts avoidable 
wear on the system. I have a similar setup although not for MythTV and 
having just 6 drives continuously patter away is distracting. And when 
you know the drives are capable of doing these tiny 1ms bursts in a 
single 1/2 second burst once every few mins, you can't help but think 
that your drives will die before their time. Adding a buffer isn't 
something I can help with but its a good idea for those of us that have 
lots of RAM, a stable system and wish to reduce constant use of the drives.


>                          Roger
>                               Roger
>   



More information about the mythtv-users mailing list