Re: [QUESTION] is SLAB considered legacy and deprecated?

From: Hyeonggon Yoo
Date: Wed Sep 29 2021 - 06:51:04 EST


On Tue, Sep 28, 2021 at 11:12:36AM +0000, Hyeonggon Yoo wrote:
> SLAB uses much memory than slab,

not slab, slub.

> when there are *lots* of NUMA nodes.
> because kmem_cache_node exist per node and it keeps alien cache
> (used for caching freeing object from remote node),
> so it keeps MAX_NUMANODES ^ 2 of array_cache per slab.

not "per slab". it is per cache (kmem_cache).

it was my mistake. but that is still too much for
systems with high number of numa nodes.

batching freeing object from remote node is needed,
but slab uses too much memory for that.

for each node, it allocates alien cache for every other nodes.
so it's using MAX_NUMNODES ^ 2 alien_cache.

> that is why I said SLAB uses much memory than SLUB.