netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nikolay@cumulusnetworks.com
Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com,
	sharpd@cumulusnetworks.com
Subject: Re: [PATCH net-next] ipmr: improve hash scalability
Date: Thu, 12 Jan 2017 16:48:55 -0500 (EST)	[thread overview]
Message-ID: <20170112.164855.1809139637816615905.davem@davemloft.net> (raw)
In-Reply-To: <1484232813-11473-1-git-send-email-nikolay@cumulusnetworks.com>

From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Date: Thu, 12 Jan 2017 15:53:33 +0100

> Recently we started using ipmr with thousands of entries and easily hit
> soft lockups on smaller devices. The reason is that the hash function
> uses the high order bits from the src and dst, but those don't change in
> many common cases, also the hash table  is only 64 elements so with
> thousands it doesn't scale at all.
> This patch migrates the hash table to rhashtable, and in particular the
> rhl interface which allows for duplicate elements to be chained because
> of the MFC_PROXY support (*,G; *,*,oif cases) which allows for multiple
> duplicate entries to be added with different interfaces (IMO wrong, but
> it's been in for a long time).
> 
> And here are some results from tests I've run in a VM:
>  mr_table size (default, allocated for all namespaces):
>   Before                    After
>    49304 bytes               2400 bytes
> 
>  Add 65000 routes (the diff is much larger on smaller devices):
>   Before                    After
>    1m42s                     58s
> 
>  Forwarding 256 byte packets with 65000 routes (test done in a VM):
>   Before                    After
>    3 Mbps / ~1465 pps        122 Mbps / ~59000 pps
> 
> As a bonus we no longer see the soft lockups on smaller devices which
> showed up even with 2000 entries before.
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

Looks really nice, applied, thanks!

      reply	other threads:[~2017-01-12 21:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 14:53 [PATCH net-next] ipmr: improve hash scalability Nikolay Aleksandrov
2017-01-12 21:48 ` David Miller [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=20170112.164855.1809139637816615905.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=sharpd@cumulusnetworks.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).