Skip to content

[3pt] Add 'slab_alloc_granularity' option to box.cfg{} #1911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #2665
TarantoolBot opened this issue Mar 11, 2021 · 0 comments · Fixed by #3355
Closed
Tracked by #2665

[3pt] Add 'slab_alloc_granularity' option to box.cfg{} #1911

TarantoolBot opened this issue Mar 11, 2021 · 0 comments · Fixed by #3355
Assignees
Labels
feature A new functionality reference [location] Tarantool manual, Reference part

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Mar 11, 2021

Related dev. issue(s): tarantool/tarantool#5518

Product: Tarantool
Since: 2.8.1
Root document: Configuring the storage
SME: ?

Details

Add slab_alloc_granularity option to box.cfg{} that allows user to set
multiplicity of memory allocation in small allocator. slab_alloc_granularity
determines not only alignment of objects, but also size of the objects in
the pool. Thus, the greater the slab_alloc_granularity, the greater the
memory loss per one memory allocation, but tuples with different sizes
are allocated from the same mempool, and we do not lose memory on
the slabs, when we have highly distributed tuple sizes. This is somewhat
similar to a large alloc factor. The smaller the slab_alloc_granularity, the less
memory loss per allocation, if the user has many small tuples of approximately
the same size, it will be nice to set slab_alloc_granularity == 4 to save memory.

This option must be set once during start, default value == sizeof(intptr_t)
(8 on 64 bit platforms), as it was before, when this option was not provided.
slab_alloc_granularity must be exponent of two and >= 4. Together with the
slab_alloc_factor, this option gives you full control over the behavior of small allocator.

Add the reference to slab_alloc_granularity in the slab_alloc_factor description:
"See also slab_alloc_granularity".

Closes #5518
Requested by @mechanik20051988 in tarantool/tarantool@53c0e91.

@EvgenyMekhanik EvgenyMekhanik changed the title Add 'granularity' option to box.cfg{} Add 'slab_alloc_granularity' option to box.cfg{} Mar 19, 2021
@NickVolynkin NickVolynkin added feature A new functionality reference [location] Tarantool manual, Reference part labels Mar 25, 2021
@NickVolynkin NickVolynkin changed the title Add 'slab_alloc_granularity' option to box.cfg{} [3pt] Add 'slab_alloc_granularity' option to box.cfg{} Mar 25, 2021
@veod32 veod32 assigned veod32 and andreyaksenov and unassigned veod32 Feb 20, 2023
@veod32 veod32 linked a pull request Feb 22, 2023 that will close this issue
andreyaksenov added a commit that referenced this issue Feb 27, 2023
Add reference docs for the `memtx_allocator` and `slab_alloc_granularity` options.

Resolves #2291 
Resolves #1911
@veod32 veod32 removed the 3sp label Mar 8, 2023
p7nov pushed a commit that referenced this issue Mar 24, 2023
Add reference docs for the `memtx_allocator` and `slab_alloc_granularity` options.

Resolves #2291 
Resolves #1911
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality reference [location] Tarantool manual, Reference part
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants