[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84144f020707090547p5ccb1ec7i5197c8312c910551@mail.gmail.com>
Date: Mon, 9 Jul 2007 15:47:25 +0300
From: "Pekka Enberg" <penberg@...helsinki.fi>
To: "Nick Piggin" <nickpiggin@...oo.com.au>
Cc: "Andrew Morton" <akpm@...ux-foundation.org>,
"Ingo Molnar" <mingo@...e.hu>,
"Christoph Lameter" <clameter@....com>,
linux-kernel@...r.kernel.org, linux-mm@...r.kernel.org,
suresh.b.siddha@...el.com, corey.d.gough@...el.com,
"Matt Mackall" <mpm@...enic.com>,
"Denis Vlasenko" <vda.linux@...glemail.com>,
"Erik Andersen" <andersen@...epoet.org>
Subject: Re: [patch 09/10] Remove the SLOB allocator for 2.6.23
Hi Nick,
Pekka Enberg wrote:
> > I assume with "slab external fragmentation" you mean allocating a
> > whole page for a slab when there are not enough objects to fill the
> > whole thing thus wasting memory?
On 7/9/07, Nick Piggin <nickpiggin@...oo.com.au> wrote:
> Yep. Without really analysing it, I guess SLOB's savings here are
> O(1) over SLUB and will relatively diminish as the machine size gets
> larger, however with the number of slabs even a small kernel creates,
> this is likely to be significant on small memory systems.
Running the included script on my little Debian on UML with 32 MB of
RAM shows anywhere from 20 KB up to 100 KB of wasted space on light
load. What's interesting is that the wasted amount seems to stabilize
around 70 KB and never goes below that.
Pekka
#!/bin/bash
total_wasted=0
for i in $(find /sys/slab -type d -mindepth 1 -maxdepth 1 | sort)
do
nr_objs=$(cat $i/objects)
slabs=$(cat $i/slabs)
objs_per_slab=$(cat $i/objs_per_slab)
let "max_objs=$objs_per_slab*$slabs"
object_size=$(cat $i/object_size)
let "wasted=($max_objs-$nr_objs)*$object_size"
if [ "$wasted" -ne "0" ]; then
echo "$i: max_objs=$max_objs, nr_objs=$nr_objs, $wasted bytes wasted"
fi
let "total_wasted=$total_wasted+$wasted"
done
echo "Total wasted: $total_wasted"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists