linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Phillip Susi <psusi@ubuntu.com>
Cc: Matthew Wilcox <willy@linux.intel.com>, linux-fsdevel@vger.kernel.org
Subject: Re: Tracking actual disk write sources instead of flush thread
Date: Thu, 24 Apr 2014 21:33:28 +0200	[thread overview]
Message-ID: <20140424193328.GE13573@quack.suse.cz> (raw)
In-Reply-To: <534E9E9D.5030600@ubuntu.com>

On Wed 16-04-14 11:15:41, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 4/16/2014 10:01 AM, Matthew Wilcox wrote:
> > On Tue, Apr 15, 2014 at 10:01:27PM -0400, Phillip Susi wrote:
> >> A lot of disk writes, especially when they are small individual
> >> files being written by several different processes, are hidden
> >> behind the flush thread.  Is there no way to properly track the
> >> process actually responsible for the IO, even when it is the
> >> flush thread that initiates the writeout?
> > 
> > Correct.
> 
> Wow.  If I understand things correctly, this also means that if
> process A dirties a ton of cache pages, then process B tries to write
> a relatively small amount, it can end up blocking in the synchronous
> flush path, and so it will appear that process B and flush are doing
> all of the writes, and not process A.
  There is nothing like synchronous flush path anymore (since 3.1 or
something like that). All flushing is done by the flusher works these days
(and sync(2), fsync(2) obviously). And you are right we have no way to
attribute particular dirty pages in page cache to a process. However we do
track how many pages each process has dirtied and use this information in
throttling processes in balance_dirty_pages() (the process waits in that
function for a time proportional to the number of dirtied pages since
it last entered that function).

However that dirty counter isn't very useful for administrative purposes
because it gets zeroed out in balance_dirty_pages(). But as others have
pointed out for tracking originators of dirty pages, we would like
something which survives longer than a process anyway.

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

      parent reply	other threads:[~2014-04-24 19:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16  2:01 Tracking actual disk write sources instead of flush thread Phillip Susi
2014-04-16 14:01 ` Matthew Wilcox
2014-04-16 15:15   ` Phillip Susi
2014-04-16 16:42     ` Andreas Dilger
2014-04-16 17:44     ` Zuckerman, Boris
2014-04-16 18:18       ` Phillip Susi
2014-04-16 18:28         ` Zuckerman, Boris
2014-04-16 19:27           ` Phillip Susi
2014-04-23 13:48             ` Matthew Wilcox
2014-04-23 19:39               ` Phillip Susi
2014-04-23 23:00                 ` Theodore Ts'o
2014-04-24  1:20                   ` Phillip Susi
2014-04-23 23:19                 ` Andreas Dilger
2014-04-24  1:39                   ` Phillip Susi
2014-04-28  3:27                   ` Andi Kleen
2014-04-16 19:33     ` Andi Kleen
2014-04-24 19:33     ` Jan Kara [this message]

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=20140424193328.GE13573@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=psusi@ubuntu.com \
    --cc=willy@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).