All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Banks <gnb@fastmail.fm>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	Neil Brown <neilb@suse.de>, David Miller <davem@davemloft.net>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"bmarson@redhat.com" <bmarson@redhat.com>
Subject: Re: [PATCH] sunrpc: use better NUMA affinities
Date: Sat, 30 Jul 2011 06:39:34 +1000	[thread overview]
Message-ID: <D2301275-8653-41CB-BADB-E927CF00BDB0@fastmail.fm> (raw)
In-Reply-To: <20110729180844.GA28947@fieldses.org>



Sent from my iPhone

On 30/07/2011, at 4:08, "J. Bruce Fields" <bfields@fieldses.org> wrote:

> On Fri, Jul 29, 2011 at 08:02:05PM +0200, Eric Dumazet wrote:
>> Le vendredi 29 juillet 2011 à 12:42 -0400, J. Bruce Fields a écri 
>> t :
>>> On Thu, Jul 28, 2011 at 08:04:09PM +0200, Eric Dumazet wrote:
>>>> Use NUMA aware allocations to reduce latencies and increase  
>>>> throughput.
>>>>
>>>> sunrpc kthreads can use kthread_create_on_node() if pool_mode is
>>>> "percpu" or "pernode", and svc_prepare_thread()/svc_init_buffer()  
>>>> can
>>>> also take into account NUMA node affinity for memory allocations.
>>> ...
>>>> @@ -662,14 +675,16 @@ svc_set_num_threads(struct svc_serv *serv,  
>>>> struct svc_pool *pool, int nrservs)
>>>>        nrservs--;
>>>>        chosen_pool = choose_pool(serv, pool, &state);
>>>>
>>>> -        rqstp = svc_prepare_thread(serv, chosen_pool);
>>>> +        node = svc_pool_map_get_node(chosen_pool->sp_id);
>>>> +        rqstp = svc_prepare_thread(serv, chosen_pool, node);
>>>
>>> The only correct value for the third argument there is
>>> svc_pool_map_get_node(chosen_pool->sp_id), so let's have
>>> svc_prepare_thread() call that itself.
>>>
>>
>> I have no idea of what you mean ;)
>>
>> I need 'node' for the following kthread_create_on_node()
>
> Doh, of course--apologies.
>
>>> Seems OK otherwise.
>>>
>>> Any suggestions on how we should test this?
>>
>> I did tests on my machine, seems good.
>>
>> I checked that stacks were now correct using :
>> "echo t > /proc/sysrq-trigger"
>
> I was wondering more about good tests of nfsd's performance on numa;
> that might be more of a question for Greg.
>

To really show a big difference you need a much bigger box, or slower  
NUMA interconnects than today's. You also want network cards locally  
attached to each node and a metadata heavy (i.e. high rpc call rate)  
load.

Greg.

WARNING: multiple messages have this Message-ID (diff)
From: Greg Banks <gnb@fastmail.fm>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	Neil Brown <neilb@suse.de>, David Miller <davem@davemloft.net>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"bmarson@redhat.com" <bmarson@redhat.com>
Subject: Re: [PATCH] sunrpc: use better NUMA affinities
Date: Sat, 30 Jul 2011 06:39:34 +1000	[thread overview]
Message-ID: <D2301275-8653-41CB-BADB-E927CF00BDB0@fastmail.fm> (raw)
In-Reply-To: <20110729180844.GA28947@fieldses.org>



Sent from my iPhone

On 30/07/2011, at 4:08, "J. Bruce Fields" <bfields@fieldses.org> wrote:

> On Fri, Jul 29, 2011 at 08:02:05PM +0200, Eric Dumazet wrote:
>> Le vendredi 29 juillet 2011 à 12:42 -0400, J. Bruce Fields a écri 
>> t :
>>> On Thu, Jul 28, 2011 at 08:04:09PM +0200, Eric Dumazet wrote:
>>>> Use NUMA aware allocations to reduce latencies and increase  
>>>> throughput.
>>>>
>>>> sunrpc kthreads can use kthread_create_on_node() if pool_mode is
>>>> "percpu" or "pernode", and svc_prepare_thread()/svc_init_buffer()  
>>>> can
>>>> also take into account NUMA node affinity for memory allocations.
>>> ...
>>>> @@ -662,14 +675,16 @@ svc_set_num_threads(struct svc_serv *serv,  
>>>> struct svc_pool *pool, int nrservs)
>>>>        nrservs--;
>>>>        chosen_pool = choose_pool(serv, pool, &state);
>>>>
>>>> -        rqstp = svc_prepare_thread(serv, chosen_pool);
>>>> +        node = svc_pool_map_get_node(chosen_pool->sp_id);
>>>> +        rqstp = svc_prepare_thread(serv, chosen_pool, node);
>>>
>>> The only correct value for the third argument there is
>>> svc_pool_map_get_node(chosen_pool->sp_id), so let's have
>>> svc_prepare_thread() call that itself.
>>>
>>
>> I have no idea of what you mean ;)
>>
>> I need 'node' for the following kthread_create_on_node()
>
> Doh, of course--apologies.
>
>>> Seems OK otherwise.
>>>
>>> Any suggestions on how we should test this?
>>
>> I did tests on my machine, seems good.
>>
>> I checked that stacks were now correct using :
>> "echo t > /proc/sysrq-trigger"
>
> I was wondering more about good tests of nfsd's performance on numa;
> that might be more of a question for Greg.
>

To really show a big difference you need a much bigger box, or slower  
NUMA interconnects than today's. You also want network cards locally  
attached to each node and a metadata heavy (i.e. high rpc call rate)  
load.

Greg.--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2011-07-29 20:39 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 18:04 [PATCH] sunrpc: use better NUMA affinities Eric Dumazet
2011-07-29 16:42 ` J. Bruce Fields
2011-07-29 16:42   ` J. Bruce Fields
2011-07-29 18:02   ` Eric Dumazet
2011-07-29 18:02     ` Eric Dumazet
2011-07-29 18:08     ` J. Bruce Fields
2011-07-29 18:08       ` J. Bruce Fields
2011-07-29 20:39       ` Greg Banks [this message]
2011-07-29 20:39         ` Greg Banks
2011-08-05 21:28 ` J. Bruce Fields
2011-08-05 21:28   ` J. Bruce Fields
     [not found] <20110729153207.17af3085@notabene.brown>
2011-07-29  6:05 ` Fw: " Greg Banks
2011-07-29  6:30   ` Eric Dumazet
2011-07-29  6:53     ` Greg Banks
2011-07-29 10:36       ` Christoph Hellwig
2011-07-29 11:58         ` Greg Banks
2011-07-29 12:11           ` Eric Dumazet
2011-07-29 13:30             ` Greg Banks
2011-07-29 13:30               ` Greg Banks
2011-07-29 13:30               ` Greg Banks
2011-07-29 16:48               ` J. Bruce Fields
2011-07-29 16:48                 ` J. Bruce Fields
2011-07-29 16:53                 ` J. Bruce Fields
2011-07-29 18:15                   ` Eric Dumazet
2011-07-29 18:15                     ` Eric Dumazet
2011-07-29 20:34                   ` Greg Banks
2011-07-29 20:34                     ` Greg Banks
2011-07-29 23:30                     ` NeilBrown
2011-07-29 23:30                       ` NeilBrown
2011-07-29 23:48                       ` J. Bruce Fields
2011-07-29 23:48                         ` J. Bruce Fields
2011-07-29 23:48                         ` J. Bruce Fields
2011-07-30  4:08                         ` Eric Dumazet
2011-07-30  4:08                           ` Eric Dumazet
2011-07-30  4:08                           ` Eric Dumazet
2011-07-30  6:06                           ` NeilBrown
2011-07-30  6:06                             ` NeilBrown
2011-07-30  6:23                             ` Eric Dumazet
2011-07-30  6:23                               ` Eric Dumazet
2011-07-31  6:58                               ` Eric Dumazet
2011-07-31  6:58                                 ` Eric Dumazet
2011-08-27  0:02                                 ` J. Bruce Fields
2011-08-28 10:02                                   ` Eric Dumazet
2011-08-28 10:02                                     ` Eric Dumazet
2011-08-02  1:06                       ` J. Bruce Fields
2011-08-02  1:06                         ` J. Bruce Fields
2011-07-29 16:45       ` Fw: " J. Bruce Fields
2011-07-29 20:24         ` Greg Banks

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=D2301275-8653-41CB-BADB-E927CF00BDB0@fastmail.fm \
    --to=gnb@fastmail.fm \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=bmarson@redhat.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=netdev@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.