Hey,
Items larger than the slab class max are "chunked" across multiple slab
chunks. See:
https://github.com/memcached/memcached/wiki/ReleaseNotes1429
Since that release a "cap" chunk mode was added, so if chunk max is set to
16k and you store a 17k item, it will split into:
1) tiny chunk for key and header
2) 16k main chunk
3) attempt to "cap" with a 1k chunk
if it cannot allocate the 1k cap memory for some reason it will allocate
an extra 16k chunk instead.
The theory is that at larger item sizes we can spend a little CPU to
improve the memory efficiency. Making the "max slab class" smaller means
we can make better use of the slab classes. At some point I will be
reducing the default setting from 512k to 256k or lower, but I need to
revisit it and add some stats counters first.
-Dormando
On Tue, 6 Jun 2023, boaz shavit wrote:
> Hello,I'm trying to understand how data is saved in memcached for items with size > 0.5M.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "memcached" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
memcached+...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/memcached/dedecb91-b3d2-4a83-8253-0ad965cecd68n%40googlegroups.com.
>
>