I always used memcached without knowing how it stores things.. never knew about the slab thing.

It is more sophisticated than grab memory per item.

This helped be to understand it better - https://vectree.io/c/memcached-internals-slab-allocation-lru...