Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] region: do not rotate slabs in case of single slab purification
Date: Mon, 10 Feb 2020 14:52:41 +0300	[thread overview]
Message-ID: <20200210115241.GE1110@tarantool.org> (raw)
In-Reply-To: <218075cd-d38d-1134-efab-6c713e34cef4@tarantool.org>

On 08 Feb 01:28, Vladislav Shpilevoy wrote:
> Hi! Thanks for the explanation!
> 
> On 07/02/2020 14:58, Nikita Pettik wrote:
> > ...
> > region alloc size 1
> > current slab unused 1978
> > current slab used 2062
> > current slab size 4096
> > region alloc size 1
> > current slab unused 1977
> > current slab used 2063
> > current slab size 4096
> > fiber_gc
> > fiber reset //at this step total memory is 26730 - 2063 = 24667
> > 
> > At the end of execution fibre_gc() is called, which in turn will nullify
> > slab->used memory consuption and ergo reduce whole fiber.memory.used
> > consumption by 2063. That's why amount of memory in usage at the end of
> > query execution does not match with initial value.
> > 
> > Now, if truncate didn't rotate slab, region memory before and after
> > query execution would be the same. So, it would make tests like this
> > more stable, since region leaks could be easily detected as difference
> > between initial (i.e. before query execution) and final
> > (i.e. after execution) occupied region memory.
> 
> Aha, now I see. region_reset() does not nullify all the
> slabs. I missed that the revert is already pushed. Yes, then
> looks fine. Except that if a request uses more than 128Kb, then
> it will call region_free() in fiber_gc() and will reduce memory
> consumption anyway. But for small tests may help.
> 
> The patch LGTM.

Fixed a few typos in commit message and re-pushed. Patch received 2 LGTMs;
Alexander Tikhonov reported that there's no performance degradations (as
well as significant gains) according to sysbench.

  reply	other threads:[~2020-02-10 11:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 17:14 Nikita Pettik
2020-02-06 18:43 ` Konstantin Osipov
2020-02-06 20:48 ` Vladislav Shpilevoy
2020-02-07 13:58   ` Nikita Pettik
2020-02-08  0:28     ` Vladislav Shpilevoy
2020-02-10 11:52       ` Nikita Pettik [this message]
2020-04-10 10:10 Aleksandr Lyapunov

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=20200210115241.GE1110@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] region: do not rotate slabs in case of single slab purification' \
    /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