Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Igor Munkin <imun@tarantool.org>
Cc: v.shpilevoy@tarantool.org, tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] net.box: allow to store user-defined fields in future object
Date: Fri, 13 Aug 2021 12:57:00 +0300	[thread overview]
Message-ID: <20210813095700.7vumduzrevgmcuyi@esperanza> (raw)
In-Reply-To: <20210812181356.GO27855@tarantool.org>

On Thu, Aug 12, 2021 at 09:13:56PM +0300, Igor Munkin wrote:
> Vova,
> 
> Thanks for the patch! I am curious why Lua tables are not chosen for
> storing users data? It looks more natural (kinda netbox request storage
> that would be similar to the fiber's one), and easier to implement. Of
> course the only thing bothering me about Lua tables usage is Lua GC
> pressure. However:
> * Whether there are *too* much entries, TABOV might occur for REGISTRY
>   table and keeping many tables (especially short living ones) at once
>   is also not such good option.
> * In case there are *just* much entries, I perhaps that REGISTRY
>   performance is better that spawning lots of tables. Anyway, I haven't
>   look on the mhash implementation, so I have no estimations about its
>   perfomance. I see they are created and destroyed manually, but Lua
>   tables are within the GC reign, so some time is spent on their
>   traversal. At the same time, REGISTRY traversal is atomic, so
>   inflating it also affects the time spent on a particular incremental
>   GC step. Too much theory, BTW. Benchmarks are required for this case.
> * If this is more an exceptional option (that's I doubt considering
>   Yaroslav complains regarding this functionality breakage), then any of
>   the option is fine IMHO, so the most convenient is preferable.
> 
> It would be great to see the comparison for your current implementation
> and the one using Lua tables. The most interesting workload is a bunch
> of short-term requests, I guess.

According to my measurements, Lua tables perform slightly better (+1%)
than mhash. The code looks simpler as well so I'll go with Lua tables.
Will send v3 in reply to this email. Thanks!

  reply	other threads:[~2021-08-13  9:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 16:53 Vladimir Davydov via Tarantool-patches
2021-08-10 17:15 ` Cyrill Gorcunov via Tarantool-patches
2021-08-11  7:49   ` Vladimir Davydov via Tarantool-patches
2021-08-12 17:07     ` [Tarantool-patches] [PATCH v2] " Vladimir Davydov via Tarantool-patches
2021-08-12 18:02 ` [Tarantool-patches] [PATCH] " Vladislav Shpilevoy via Tarantool-patches
2021-08-12 18:13   ` Vladislav Shpilevoy via Tarantool-patches
2021-08-13 10:01   ` Vladimir Davydov via Tarantool-patches
2021-08-12 18:13 ` Igor Munkin via Tarantool-patches
2021-08-13  9:57   ` Vladimir Davydov via Tarantool-patches [this message]
2021-08-13  9:59     ` [Tarantool-patches] [PATCH v3] " Vladimir Davydov via Tarantool-patches
2021-08-14 11:17       ` Igor Munkin via Tarantool-patches
2021-08-16  8:27         ` Vladimir Davydov via Tarantool-patches
2021-08-16  8:56           ` Igor Munkin via Tarantool-patches
2021-08-16 11:32             ` Vitaliia Ioffe via Tarantool-patches
2021-08-16 11:35               ` Vladimir Davydov via Tarantool-patches

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=20210813095700.7vumduzrevgmcuyi@esperanza \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --cc=vdavydov@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] net.box: allow to store user-defined fields in future object' \
    /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