netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Robert Olsson <Robert.Olsson@data.slu.se>
Cc: Robert.Olsson@data.slu.se, kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com
Subject: Re: [PATCH] option for large routing hash
Date: Wed, 10 Dec 2003 00:15:56 -0800	[thread overview]
Message-ID: <20031210001556.71253d1f.davem@redhat.com> (raw)
In-Reply-To: <16342.19599.686693.823755@robur.slu.se>

On Tue, 9 Dec 2003 23:28:31 +0100
Robert Olsson <Robert.Olsson@data.slu.se> wrote:

> IP: routing cache hash table of 4096 buckets, 32Kbytes
 ...
> And tot+hit gives the pps throughput 152 kpps.
 ...
> IP: routing cache hash table of 32768 buckets, 256Kbytes
 ...
> We see cache is now used as hit > tot and we get a performance jump from 
> 152 to 265 kpps.
> 
> Just as you said this was the experiment. I'll stop here for now.

Thanks for the data.

I would eventually like an algorithm that uses a min/max range.
Perhaps something like:

const unsigned long rthash_min = PAGE_SIZE:
const unsigned long rthash_max = PAGE_ALIGN(512 * 1024 *
					    sizeof(struct rt_hash_bucket));

unsigned long rthash_choose_size(unsigned long num_physpages)
{
	unsigned long goal;

	goal = num_physpages >> (23 - PAGE_SHIFT);
	if (goal < rthash_min)
		goal = rthash_min;
	if (goal > rthash_max)
		goal = rthash_max;
	return goal;
}

It's a combination of your goal computation adjustment along with
sanity limits, that's all.

  reply	other threads:[~2003-12-10  8:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-09 15:09 [PATCH] option for large routing hash Robert Olsson
2003-12-09 20:20 ` David S. Miller
2003-12-09 22:28   ` Robert Olsson
2003-12-10  8:15     ` David S. Miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-12-10 14:47 Robert Olsson
2003-12-10 23:05 ` David S. Miller
2003-12-12 23:10   ` Robert Olsson

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=20031210001556.71253d1f.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=Robert.Olsson@data.slu.se \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@oss.sgi.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).