Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: Kirill Shcherbatov <kshcherbatov@tarantool.org>
Cc: tarantool-patches@freelists.org, vdavydov.dev@gmail.com
Subject: Re: [PATCH v3 3/4] box: introduce tuple_extra infrastructure
Date: Thu, 18 Jul 2019 12:47:57 +0300	[thread overview]
Message-ID: <20190718094757.GB21191@atlas> (raw)
In-Reply-To: <3474f2b5e217e1dcd5ab405b72f574b283b132f0.1563326037.git.kshcherbatov@tarantool.org>

* Kirill Shcherbatov <kshcherbatov@tarantool.org> [19/07/17 09:39]:
> Introduced a new object tuple_extra: a memory allocation is
> associated with given tuple and chunk_id. Extended tuple_format's
> vtab with few new methods to manage tuple_extras lifecycle.
> Supported tuple_extra for memtx engine: a memory
> chunks are allocated with memtx's smalloc allocator.

tuple_extra is a very general name. 

Are all extra chunks/segments of equal size, or variable size?

Why not change tuple format right away to consist of segments, and
add segments on the side? 

I've been warning about a mounting technical debt, and this is
basically beyond any reasonable limit:
- we have huge problems that large tuples lead to memory
  fragmentation
- we have an ugly realloc when building a tuple field map for
  multikey indexes
- now we have a yet another ugly thing on the side for functional 
  indexes.

I understand that coming up with a new log structured tuple allocator 
may be considered beyond the scope of this patch. But even without
a new allocator this patch is already half way through segmented
tuple structure.

So please deal with the debt first and transform tuple format to
segmented one.

The first segment should be up to a few kilobytes in size and
should contain the old-good-tuple as it is now. All subsequent
segments could be allocated using the same principles as in stl
deque - an array of chunks.


-- 
Konstantin Osipov, Moscow, Russia

  reply	other threads:[~2019-07-18  9:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17  1:20 [PATCH v3 0/4] box: functional indexes Kirill Shcherbatov
2019-07-17  1:20 ` [PATCH v3 1/4] box: introduce key_def->is_multikey flag Kirill Shcherbatov
2019-07-17 14:34   ` Konstantin Osipov
2019-07-18 11:20   ` [tarantool-patches] " Kirill Yukhin
2019-07-17  1:20 ` [PATCH v3 2/4] box: refactor key_validate_parts to return key_end Kirill Shcherbatov
2019-07-18  9:41   ` Konstantin Osipov
2019-07-18 11:21   ` [tarantool-patches] " Kirill Yukhin
2019-07-17  1:20 ` [PATCH v3 3/4] box: introduce tuple_extra infrastructure Kirill Shcherbatov
2019-07-18  9:47   ` Konstantin Osipov [this message]
2019-07-17  1:20 ` [PATCH v3 4/4] box: introduce functional indexes in memtx Kirill Shcherbatov
2019-07-18  9:50   ` [tarantool-patches] " Konstantin Osipov
2019-07-18  9:54   ` Konstantin Osipov
2019-07-18  9:55   ` Konstantin Osipov
2019-07-18 10:02   ` Konstantin Osipov
2019-07-22 14:45   ` Vladimir Davydov

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=20190718094757.GB21191@atlas \
    --to=kostja@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [PATCH v3 3/4] box: introduce tuple_extra infrastructure' \
    /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