Subject: Re: Route cache performance under stress

From: Simon Kirby <[email-masked]>
Date: Thu, 22 May 2003 04:44:38 -0700

On Thu, May 22, 2003 at 03:40:58AM -0700, David S. Miller wrote:

> Simon (and others who want to benchmark :-), give this patch below a
> try.

Compiling it now... :)

There's no APIC on this test box, so it's using the XT-PIC.  Production
has an APIC, so I assume the overhead would be less there.

CONFIG_IP_ROUTE_LARGE_TABLES is and was enabled.

My dumb route populator script was just creating /32 routes.

> Anyways, testers please let us know the results.  Note you must
> have CONFIG_IP_ROUTE_LARGE_TABLES (and thus CONFIG_IP_ADVANCED_ROUTER)
> in order to even make use of this stuff.

Nice!  I tested with 300,000 routing table entries and there is no
discernable difference in performance from having an empty table. 
vmstat shows the same idle time as when the routing table is empty.

I enabled the hash growing debug printk, and so I saw this while
populating the route table:

fn_rehash_zone: hash for zone 32 grows from 16
fn_rehash_zone: hash for zone 32 grows from 256
fn_rehash_zone: hash for zone 32 grows from 1024
fn_rehash_zone: hash for zone 32 grows from 2048
fn_rehash_zone: hash for zone 32 grows from 4096
fn_rehash_zone: hash for zone 32 grows from 8192
fn_rehash_zone: hash for zone 32 grows from 16384
fn_rehash_zone: hash for zone 32 grows from 32768
fn_rehash_zone: hash for zone 32 grows from 65536
fn_rehash_zone: hash for zone 32 grows from 131072

I had originally written a patch to try to extend it to 8192, but I think
it was broken.  This definitely seems to fix it.

If you'd like I can try to regenerate a profile, but you probably already
know what it will look like.

Thanks!

Simon- (Zzz...)