All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Michael Rubin <mrubin@google.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"jack@suse.cz" <jack@suse.cz>,
	"riel@redhat.com" <riel@redhat.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"david@fromorbit.com" <david@fromorbit.com>,
	"npiggin@suse.de" <npiggin@suse.de>, "hch@lst.de" <hch@lst.de>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH 2/3] writeback: Adding pages_dirtied and pages_entered_writeback
Date: Fri, 20 Aug 2010 16:43:04 +0800	[thread overview]
Message-ID: <20100820084304.GA6051@localhost> (raw)
In-Reply-To: <AANLkTimKn5BZiCAyr-3XAZuu66Q+ASZgBZ7LDU2Jom1p@mail.gmail.com>

On Fri, Aug 20, 2010 at 04:16:09PM +0800, Michael Rubin wrote:
> On Thu, Aug 19, 2010 at 7:51 PM, Wu Fengguang <fengguang.wu@intel.com> wrote:
> > As Rik said, /proc/sys is not a suitable place.
> 
> OK I'm convinced.
> 
> > Frankly speaking I've worked on writeback for years and never felt
> > the need to add these counters. What I often do is:
> >
> > $ vmmon -d 1 nr_writeback nr_dirty nr_unstable
> >
> >     nr_writeback         nr_dirty      nr_unstable
> >            68738                0            39568
> >            66051                0            42255
> >            63406                0            44900
> >            60643                0            47663
> >            57954                0            50352
> >            55264                0            53042
> >            52592                0            55715
> >            49922                0            58385
> > That is what I get when copying /dev/zero to NFS.
> >
> > I'm very interested in Google's use case for this patch, and why
> > the simple /proc/vmstat based vmmon tool is not enough.
> 
> So as I understand it from looking at the code vmmon is sampling
> nr_writeback, nr_dirty which are exported versions of
> global_page_state for NR_FILE_DIRTY and NR_WRITEBACK. These states are
> a snapshot of the state of the kernel's pages. Namely how many dpages
> ar ein writeback or dirty at the moment vmmon's acquire routine is
> called.
> 
> vmmon is sampling /proc/vstat and then displaying the difference from
> the last time they sampled.  If I am misunderstanding let me know.

Maybe Andrew's vmmon does that. My vmmon always display the raw values
:) It could be improved to do raw values for nr_dirty and differences
for pgpgin by default.

> This is good for the state of the system but as we compare
> application, mm and io performance over long periods of time we are
> interested in the surges and fluctuations of the rates of the
> producing and consuming of dirty pages also. It can help isolate where
> the problem is and also to compare performance between kernels and/or
> applications.

Yeah the accumulated dirty and writeback page counts could be useful.
For example, for inspecting the dirty and writeback speed over time.
That's not possible for nr_dirty/nr_writeback.

Thanks,
Fengguang

WARNING: multiple messages have this Message-ID (diff)
From: Wu Fengguang <fengguang.wu@intel.com>
To: Michael Rubin <mrubin@google.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"jack@suse.cz" <jack@suse.cz>,
	"riel@redhat.com" <riel@redhat.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"david@fromorbit.com" <david@fromorbit.com>,
	"npiggin@suse.de" <npiggin@suse.de>, "hch@lst.de" <hch@lst.de>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH 2/3] writeback: Adding pages_dirtied and pages_entered_writeback
Date: Fri, 20 Aug 2010 16:43:04 +0800	[thread overview]
Message-ID: <20100820084304.GA6051@localhost> (raw)
In-Reply-To: <AANLkTimKn5BZiCAyr-3XAZuu66Q+ASZgBZ7LDU2Jom1p@mail.gmail.com>

On Fri, Aug 20, 2010 at 04:16:09PM +0800, Michael Rubin wrote:
> On Thu, Aug 19, 2010 at 7:51 PM, Wu Fengguang <fengguang.wu@intel.com> wrote:
> > As Rik said, /proc/sys is not a suitable place.
> 
> OK I'm convinced.
> 
> > Frankly speaking I've worked on writeback for years and never felt
> > the need to add these counters. What I often do is:
> >
> > $ vmmon -d 1 nr_writeback nr_dirty nr_unstable
> >
> >     nr_writeback         nr_dirty      nr_unstable
> >            68738                0            39568
> >            66051                0            42255
> >            63406                0            44900
> >            60643                0            47663
> >            57954                0            50352
> >            55264                0            53042
> >            52592                0            55715
> >            49922                0            58385
> > That is what I get when copying /dev/zero to NFS.
> >
> > I'm very interested in Google's use case for this patch, and why
> > the simple /proc/vmstat based vmmon tool is not enough.
> 
> So as I understand it from looking at the code vmmon is sampling
> nr_writeback, nr_dirty which are exported versions of
> global_page_state for NR_FILE_DIRTY and NR_WRITEBACK. These states are
> a snapshot of the state of the kernel's pages. Namely how many dpages
> ar ein writeback or dirty at the moment vmmon's acquire routine is
> called.
> 
> vmmon is sampling /proc/vstat and then displaying the difference from
> the last time they sampled.  If I am misunderstanding let me know.

Maybe Andrew's vmmon does that. My vmmon always display the raw values
:) It could be improved to do raw values for nr_dirty and differences
for pgpgin by default.

> This is good for the state of the system but as we compare
> application, mm and io performance over long periods of time we are
> interested in the surges and fluctuations of the rates of the
> producing and consuming of dirty pages also. It can help isolate where
> the problem is and also to compare performance between kernels and/or
> applications.

Yeah the accumulated dirty and writeback page counts could be useful.
For example, for inspecting the dirty and writeback speed over time.
That's not possible for nr_dirty/nr_writeback.

Thanks,
Fengguang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Wu Fengguang <fengguang.wu@intel.com>
To: Michael Rubin <mrubin@google.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"jack@suse.cz" <jack@suse.cz>,
	"riel@redhat.com" <riel@redhat.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"david@fromorbit.com" <david@fromorbit.com>,
	"npiggin@suse.de" <npiggin@suse.de>, "hch@lst.de" <hch@lst.de>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH 2/3] writeback: Adding pages_dirtied and pages_entered_writeback
Date: Fri, 20 Aug 2010 16:43:04 +0800	[thread overview]
Message-ID: <20100820084304.GA6051@localhost> (raw)
In-Reply-To: <AANLkTimKn5BZiCAyr-3XAZuu66Q+ASZgBZ7LDU2Jom1p@mail.gmail.com>

On Fri, Aug 20, 2010 at 04:16:09PM +0800, Michael Rubin wrote:
> On Thu, Aug 19, 2010 at 7:51 PM, Wu Fengguang <fengguang.wu@intel.com> wrote:
> > As Rik said, /proc/sys is not a suitable place.
> 
> OK I'm convinced.
> 
> > Frankly speaking I've worked on writeback for years and never felt
> > the need to add these counters. What I often do is:
> >
> > $ vmmon -d 1 nr_writeback nr_dirty nr_unstable
> >
> > A  A  nr_writeback A  A  A  A  nr_dirty A  A  A nr_unstable
> > A  A  A  A  A  A 68738 A  A  A  A  A  A  A  A 0 A  A  A  A  A  A 39568
> > A  A  A  A  A  A 66051 A  A  A  A  A  A  A  A 0 A  A  A  A  A  A 42255
> > A  A  A  A  A  A 63406 A  A  A  A  A  A  A  A 0 A  A  A  A  A  A 44900
> > A  A  A  A  A  A 60643 A  A  A  A  A  A  A  A 0 A  A  A  A  A  A 47663
> > A  A  A  A  A  A 57954 A  A  A  A  A  A  A  A 0 A  A  A  A  A  A 50352
> > A  A  A  A  A  A 55264 A  A  A  A  A  A  A  A 0 A  A  A  A  A  A 53042
> > A  A  A  A  A  A 52592 A  A  A  A  A  A  A  A 0 A  A  A  A  A  A 55715
> > A  A  A  A  A  A 49922 A  A  A  A  A  A  A  A 0 A  A  A  A  A  A 58385
> > That is what I get when copying /dev/zero to NFS.
> >
> > I'm very interested in Google's use case for this patch, and why
> > the simple /proc/vmstat based vmmon tool is not enough.
> 
> So as I understand it from looking at the code vmmon is sampling
> nr_writeback, nr_dirty which are exported versions of
> global_page_state for NR_FILE_DIRTY and NR_WRITEBACK. These states are
> a snapshot of the state of the kernel's pages. Namely how many dpages
> ar ein writeback or dirty at the moment vmmon's acquire routine is
> called.
> 
> vmmon is sampling /proc/vstat and then displaying the difference from
> the last time they sampled.  If I am misunderstanding let me know.

Maybe Andrew's vmmon does that. My vmmon always display the raw values
:) It could be improved to do raw values for nr_dirty and differences
for pgpgin by default.

> This is good for the state of the system but as we compare
> application, mm and io performance over long periods of time we are
> interested in the surges and fluctuations of the rates of the
> producing and consuming of dirty pages also. It can help isolate where
> the problem is and also to compare performance between kernels and/or
> applications.

Yeah the accumulated dirty and writeback page counts could be useful.
For example, for inspecting the dirty and writeback speed over time.
That's not possible for nr_dirty/nr_writeback.

Thanks,
Fengguang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-08-20  8:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19 20:57 [PATCH 0/3] writeback: kernel visibility Michael Rubin
2010-08-19 20:57 ` Michael Rubin
2010-08-19 20:57 ` [PATCH 1/3] mm: helper functions for dirty and writeback accounting Michael Rubin
2010-08-19 20:57   ` Michael Rubin
2010-08-20  2:34   ` Wu Fengguang
2010-08-20  2:34     ` Wu Fengguang
2010-08-20  8:19     ` Michael Rubin
2010-08-20  8:19       ` Michael Rubin
2010-08-19 20:57 ` [PATCH 2/3] writeback: Adding pages_dirtied and pages_entered_writeback Michael Rubin
2010-08-19 20:57   ` Michael Rubin
2010-08-20  2:51   ` Wu Fengguang
2010-08-20  2:51     ` Wu Fengguang
2010-08-20  6:54     ` Wu Fengguang
2010-08-20  6:54       ` Wu Fengguang
2010-08-20  8:16     ` Michael Rubin
2010-08-20  8:16       ` Michael Rubin
2010-08-20  8:43       ` Wu Fengguang [this message]
2010-08-20  8:43         ` Wu Fengguang
2010-08-20  8:43         ` Wu Fengguang
2010-08-19 20:57 ` [PATCH 3/3] writeback: Reporting dirty thresholds in /proc/vmstat Michael Rubin
2010-08-19 20:57   ` Michael Rubin
2010-08-20  3:16   ` Wu Fengguang
2010-08-20  3:16     ` Wu Fengguang
2010-08-20  8:18     ` Michael Rubin
2010-08-20  8:18       ` Michael Rubin
2010-08-19 22:11 ` [PATCH 0/3] writeback: kernel visibility Rik van Riel
2010-08-19 22:11   ` Rik van Riel

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=20100820084304.GA6051@localhost \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mrubin@google.com \
    --cc=npiggin@suse.de \
    --cc=riel@redhat.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 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.