All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erik Slagter <erik@slagter.name>
To: linux-kernel@vger.kernel.org
Subject: Help with pdflush latency / congestion on older kernel (2.6.18)
Date: Mon, 14 Jun 2010 16:03:17 +0200	[thread overview]
Message-ID: <1276524197.2036.45.camel@autems.0.0.sb.ka.wlz.nl> (raw)

Hi all,

First of all I must apologise that this relates to an older kernel
version. This kernel is used on a satellite top-box with a closed source
module of it's vendor that handles the specific hardware, so we cannot
use a new kernel, sadly. The good news is that the problem has nothing
to do with the closed source module. I was hoping that maybe this is a
known problem and has been fixed in newer kernel version and so I can
try to backport it (or maybe that has already been done...)

This is the problem. Until recently a 2.6.9 kernel was used (yep, I
hesitate to admit...) The vendor now switched to 2.6.18 and since then
we have a sort of disk write congestion problem, at least on NFS but
maybe also on local (ata) disks. It appears that pdflush waits too long
before it starts writing the dirty pages, which results in the processes
that fetch and write the data, are being blocked at a certain point. In
the meantime, data keeps coming in (satellite tv being notorious for
it's lack of flow control ;-)) and the hardware and/or os level queues
overflow, because they're not fetched in time. This is especially true
when more than one recording takes place and/or a simultaneous playback
takes place.

I think changing the user space process (like using additional threads)
will not solve the problem completely and also would be rather a
workaround instead.

We've done lot's of testing and tweaking in the meantime, detailed
information is available at request!

Things we tried already:
 - various incantations of posix_fadvise on the file to be written, only
once or on a frequent base (posix_fadvise(...DONT_NEED...))
 - opening using O_SYNC
 - tweaking /proc/vm/: dirty_background_ratio, dirty_expire_centisecs, 
dirty_ratio, dirty_writeback_centisecs

It appears that dirty_writeback_centisecs cannot be set to any value
below 5 seconds. We believe that the possibility to wake up pdflush
earlier actually would help in this case.

Would using O_DIRECT be a possible solution? I cannot test that at the
moment though, because the out-of-the-box doesn't have it enabled in the
config, but I probably can get hold a kernel that has it enabled.

Can anyone supply some help, clues, hints, tips, etc., it's very much
appreciated! Thanks very much!


                 reply	other threads:[~2010-06-14 14:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1276524197.2036.45.camel@autems.0.0.sb.ka.wlz.nl \
    --to=erik@slagter.name \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.