Re: [PATCH][RFC] slub: increasing order reduces memory usage of somekey caches

From: Christoph Lameter
Date: Wed Jul 16 2008 - 11:54:41 EST


You can get a similar effect by booting with a kernel parameter slub_min_objects=20 or so.

The fundamental difference in your patch is that you check for the wasted space in terms of a fraction of the size of a single object whereas the current logic only checks in terms of fractions of a page.

We could add an additional condition that the wasted space be no larger than half an object?

Affected slab configurations

24 byte sized caches now become an order 1 cache.
72 byte sizes caches now become order 3
96 byte 0 - > 1
320 1 -> 2
448 2 -> 3

buffer_head 0 -> 1
idr_layer_cache 2 -> 3
inode_cache 2 -> 3
journal_* 1 -> 2

etc

So the effect would be a significant enlargement of caches.

In general the speed of slub is bigger the larger the allocations it can get from the page allocator. The page allocators performance is pretty slow compared to slub alloc logic so its a win to minimize calls to it. However, that in turn will put pressure on
larger page allocations.

--
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/