[mythtv-users] pdflush is killing me

Steven Adeff adeffs.mythtv at gmail.com
Wed Feb 7 13:39:59 UTC 2007


On 2/5/07, Tony Lill <ajlill at ajlc.waterloo.on.ca> wrote:
> 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

having seen pdflush run while observing top (not knowing if it was
causing any actual issues...), I've taken an interest in what you've
written here. Would you mind elaborating on what this does for people
like me that don't know what that means?

Thanks!

> 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

cute! and followed in a close second by Bill Gates famous 1024K of RAM quote.

-- 
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette


More information about the mythtv-users mailing list