Re: Problem: scaling of /proc/stat on large systems

From: KAMEZAWA Hiroyuki
Date: Mon Oct 11 2010 - 20:14:38 EST


On Fri, 8 Oct 2010 11:35:57 -0500
Jack Steiner <steiner@xxxxxxx> wrote:

> On Tue, Oct 05, 2010 at 05:19:07PM +0900, KAMEZAWA Hiroyuki wrote:
> > On Tue, 5 Oct 2010 10:36:50 +0900
> > KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> >
> > > I guess this requres different approarch as per-cpu counter + threshould.
> > > like vmstat[] or lib/percpu_counter.
> > > Maybe people don't like to access shared counter in IRQ.
> > >
> > > But, this seems to call radixtree-lookup for the # of possible cpus.
> > > I guess impleimenting a call to calculate a sum of irqs in a radix-tree
> > > lookup will reduce overhead. If it's not enough, we'll have to make the
> > > counter not-precise. I'll write an another patch.
> > >
> >
> > How about this ? This is an add-on patch.
>
> Nice!!
>
> The combination of the 2 patches solves the problem.
> The timings are (4096p, 256 nodes, 4592 irqs):
>
> # time cat /proc/stat > /dev/null
>
> Baseline: 12.627 sec
> Patch1 : 2.459 sec
> Patch 1 + Patch 2: .561 sec
>
>
> Acked-by: Jack Steiner <steiner@xxxxxxx>
>

Thank you for testing. I'll post again if necessary.

-Kame


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