[mythtv-users] pdflush is killing me
Tony Lill
ajlill at ajlc.waterloo.on.ca
Tue Feb 6 03:47:26 UTC 2007
Nick Tan <nick at wehi.EDU.AU> writes:
> Mark Lehrer wrote:
>> Hello there, I'm having a problem with frequent pauses and I'm wondering
>> if anyone here is familiar with pdflush and how to make it a little
>> less painful.
>>
>> I use NFS for my storage, XFS file system. The problem only seems to
>> happen when I am both recording and playing back a hi def stream at
>> the same time. Every minute or so on the server, pdflush will wake up
>> and freeze all I/O for a couple of seconds. The server is running
>> Ubuntu 6.06.1 LTS, with this kernel: 2.6.15-26-686 #1 SMP PREEMPT
>>
>> Any idea how to fix the problem? It is disturbing that the ring
>> buffer size doesn't seem to help at all - 90MB should be enough to
>> handle a 30 second I/O pause but the myth playback is pausing the
>> instant that pdflush wakes up on the server. Is the ring buffer not
>> being filled in a separate thread? Does MythTV have an option that
>> works the same way as mplayer's -cache option? That seemed to always
>> work pretty well.
>>
>
> Hi Mark,
>
> According to the kernel documentation, pdflush periodically wakes up and
> flushes old data to disk. On one of my servers it was set to 5 seconds.
> Here's what I found in the kernel docs:
>
>
> dirty_writeback_centisecs
> -------------------------
>
> The pdflush writeback daemons will periodically wake up and write `old'
> data out to disk. This tunable expresses the interval between those
> wakeups, in 100'ths of a second.
>
> Setting this to zero disables periodic writeback altogether.
>
> -------------------------------
>
> Try setting dirty_writeback_centisecs to zero by doing:
>
>
> echo "0" > /proc/sys/vm/dirty_writeback_centisecs
>
> and see if that helps
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
THis worked for me (basicly by making pdflush run more often, but
with less work to do).
# % of physical memory after which a process doing a write will be paused
# untill dirty pages have been written
# default 40
echo 50 > /proc/sys/vm/dirty_ratio
# % of physical memory at which pdflush will be woken. Hopefull this will limit
# system pauses for flushes
# default 10
echo 5 > /proc/sys/vm/dirty_background_ratio
--
Tony Lill, Tony.Lill at AJLC.Waterloo.ON.CA
President, A. J. Lill Consultants fax/data (519) 650 3571
539 Grand Valley Dr., Cambridge, Ont. N3H 2S2 (519) 241 2461
--------------- http://www.ajlc.waterloo.on.ca/ ----------------
Understatement of the century:
"Hello everybody out there using minix - I'm doing a (free) operating
system (just a hobby, won't be big and professional like gnu) for
386(486) AT clones"
- Linus Torvalds, August 1991
More information about the mythtv-users
mailing list