linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Jim Rees <rees-63aXycvo3TyHXe+LvDLADg@public.gmane.org>
Cc: Trond Myklebust
	<Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Feng Tang <feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] nfs: writeback pages wait queue
Date: Sun, 20 Nov 2011 09:57:55 +0800	[thread overview]
Message-ID: <20111120015755.GA7161@localhost> (raw)
In-Reply-To: <20111119134412.GA5853-63aXycvo3TyHXe+LvDLADg@public.gmane.org>

Hi Jim,

On Sat, Nov 19, 2011 at 09:44:12PM +0800, Jim Rees wrote:
> Wu Fengguang wrote:
> 
>   The generic writeback routines are departing from congestion_wait()
>   in preference of get_request_wait(), aka. waiting on the block queues.
>   
>   Introduce the missing writeback wait queue for NFS, otherwise its
>   writeback pages will grow greedily, exhausting all PG_dirty pages.
>   
>   Tests show that it can effectively reduce stalls in the disk-network
>   pipeline, improve performance and reduce delays.
> 
> This is great stuff.  Did you do any tests on long delay paths?  I did some
> work on this a few years ago and made some progress but not enough.

Good question! I didn't test fat pipelines, which sure asks for reasonably high
nfs_congestion_kb to work well.

However we have good chances.

The nfs_congestion_kb is computed at module loading time in
nfs_init_writepagecache():

        /*
         * NFS congestion size, scale with available memory.
         *
         *  64MB:    8192k
         * 128MB:   11585k
         * 256MB:   16384k
         * 512MB:   23170k
         *   1GB:   32768k
         *   2GB:   46340k
         *   4GB:   65536k
         *   8GB:   92681k
         *  16GB:  131072k
         *
         * This allows larger machines to have larger/more transfers.
         * Limit the default to 256M
         */

For a typical mem=4GB client, nfs_congestion_kb=64MB, which is enough
to fill a 100ms*100MB/s=10MB network pipeline.

There may be more demanding ones, however that's rare case and its
user should be fully aware of the specialness and the need to do some
hand tuning, for example:

        echo $(300<<10) > /proc/sys/fs/nfs/nfs_congestion_kb

Thanks,
Fengguang
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-11-20  1:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-19 12:52 [PATCH] nfs: writeback pages wait queue Wu Fengguang
     [not found] ` <20111119134412.GA5853@umich.edu>
     [not found]   ` <20111119134412.GA5853-63aXycvo3TyHXe+LvDLADg@public.gmane.org>
2011-11-20  1:57     ` Wu Fengguang [this message]
2011-11-21  7:15 ` Wu Fengguang

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=20111120015755.GA7161@localhost \
    --to=fengguang.wu-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org \
    --cc=feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rees-63aXycvo3TyHXe+LvDLADg@public.gmane.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 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).