From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Evgeny Mekhanik <mechanik20051988@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] FW: [PATCH] memtx: change small allocator behavior
Date: Mon, 28 Dec 2020 15:10:45 +0300 [thread overview]
Message-ID: <2f2fd85a-389c-b957-d8b7-5bb36be6c155@tarantool.org> (raw)
In-Reply-To: <1608882164.215919067@f40.i.mail.ru>
Hi! Thanks for the answers!
Now much better, I understood almost everything. The only
issue seems to be with your editor now. You have extra
empty lines after each non-empty line in your emails. Do
you use a web version of mail client?
It should be all fixed if you switch to a plain-text client.
It won't ruin the cites and won't add any extra lines.
>> + alloc_factor = 1.001;
>
>
>
> 2. I don't see the factor being rounded up in the original code.
>
> Why did you add it? And why 1.0 is bad?
>
>
> Answer:
>
> Here is a code which rounded up alloc factor in master branch.
> /*
> * Correct the user-supplied alloc_factor to ensure that
> * it actually produces growing object sizes.
> */
> if (alloc->step_pool_objsize_max * alloc_factor <
> alloc->step_pool_objsize_max + STEP_SIZE) {
> alloc_factor =
> (alloc->step_pool_objsize_max + STEP_SIZE + 0.5)/
> alloc->step_pool_objsize_max;
> }
> I use gdb to show it:
> tarantool> box.cfg{slab_alloc_factor = 1.01}
> 2020-12-24 19:22:33.416 [22602] main/103/interactive C> Tarantool 2.7.0-148-gd5a5754a3
> 2020-12-24 19:22:33.416 [22602] main/103/interactive C> log level 5
> 2020-12-24 19:22:33.416 [22602] main/103/interactive I> mapping 268435456 bytes for memtx tuple arena...
> Breakpoint 1, small_alloc_create (alloc=0x555555cfe788, cache=0x555555cfe530, objsize_min=272,
> alloc_factor=1.00999999) at /home/evgeny/MASTER/tarantool/src/lib/small/small/small.c:135
> 135 alloc_factor =
> (gdb) n
> 139 alloc->factor = alloc_factor;
> (gdb) p alloc_factor
> $1 = 1.032197
> (gdb)
> As you can see if you pass slab_alloc_factor < 1.03 it's changed to 1.03. I try 0.01 factor and get the same value.
> It's code from master branch, now user can pass >= 1.001 factor. We can't use 1.0, because we need increment to pool size.
Ok, now I see, thanks.
next prev parent reply other threads:[~2020-12-28 12:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 13:14 [Tarantool-patches] [PATCH v2 0/3] " mechanik20051988
2020-12-23 13:14 ` [Tarantool-patches] [PATCH] memtx: " mechanik20051988
2020-12-24 15:13 ` Vladislav Shpilevoy
[not found] ` <0076A088-8CBC-4238-9EEB-0C73EC516098@hxcore.ol>
2020-12-25 7:42 ` [Tarantool-patches] FW: " Evgeny Mekhanik
2020-12-28 12:10 ` Vladislav Shpilevoy [this message]
2020-12-23 13:14 ` [Tarantool-patches] [PATCH v2 1/3] small: implement new size class evaluation mechanik20051988
2020-12-24 15:13 ` Vladislav Shpilevoy
[not found] ` <A90D94B7-298A-4D1B-8134-6EE2ED45D615@hxcore.ol>
2020-12-25 7:48 ` [Tarantool-patches] FW: " Evgeny Mekhanik
2020-12-28 12:10 ` [Tarantool-patches] " Vladislav Shpilevoy
2020-12-23 13:14 ` [Tarantool-patches] [PATCH v2 2/3] test: add small allocator performance test mechanik20051988
2020-12-23 13:14 ` [Tarantool-patches] [PATCH v2 3/3] small: changed small allocator pool management mechanik20051988
2020-12-24 15:13 ` Vladislav Shpilevoy
[not found] ` <27E47303-4307-4713-BB8A-2427FED09DDE@hxcore.ol>
2020-12-25 7:52 ` [Tarantool-patches] FW: " Evgeny Mekhanik
2020-12-25 7:56 ` Evgeny Mekhanik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2f2fd85a-389c-b957-d8b7-5bb36be6c155@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=mechanik20051988@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] FW: [PATCH] memtx: change small allocator behavior' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox