From: Alexander Turenko <alexander.turenko@tarantool.org>
To: Igor Munkin <imun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 0/1] fix box.info:memory()
Date: Thu, 16 Jul 2020 21:29:41 +0300 [thread overview]
Message-ID: <20200716182941.pbzrjxkwr7bftp6g@tkn_work_nb> (raw)
In-Reply-To: <20200716181658.GO5559@tarantool.org>
> > > I have no idea why it is implemented in such complex way, maybe Sasha
> > > does? Why box.info.memory yields an empty "callable" table on each
> > > lookup? Why it can't just return a function to be called or a table with
> > > memory metrics as a result of the lookup? Unfortunately the latter
> > > approach breaks the backward compatibility but the first one can save
> > > some time on short-term objects creation (I guess no one checks
> > > box.info.memory type). Thoughts? Please also consider the comments I
> > > left for the patch itself.
> >
> > I don't see a reason. The history of src/box/lua/info.c changes shows
> > that this way was initially implemented for box.info.phia() (which was
> > renamed later to box.info.vinyl()). Then box.info.memory(),
> > box.info.gc() and box.info.sql() were added in the same way.
> > box.info.phia() was moved from box.phia().
> >
> > I agree with you. We should define a case to estimate impact of
> > replacing a table + metamethod with a function. Not even to make a
> > decision whether it worth to change, but to imagine the situation at
> > whole.
> >
> > I would consider metrics collection case using tarantool/metrics every
> > minute when default metrics are enabled. I guess it'll call
> > box.info.vinyl(), box.info.memory() and box.info.gc() once for each
> > metrics collection. So the proposed change will safe 3 extra short-term
> > object creations per minute.
> >
> > I don't see a case when those functions should be called more often and
> > become a part of hot path. So I would say that reducing of GC object
> > allocations here does not look worthful for me considering possible
> > impact of subtle differences (like serialization of `box.info` or other
> > differences we can miss) that may fail some scripts or tools.
>
> Yes, it's definitely not a part of the hot path, *but* still implicitly
> affects the platform performance a little. Maybe we need to file an
> issue for such investigation? It would be nice to look on this part
> under the particular workload.
I would take it with a little priority, but of course I don't have
objections against filing an issue if you see an area for improvement.
next prev parent reply other threads:[~2020-07-16 18:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200629121118.21596-1-arkholga@tarantool.org>
2020-06-29 12:11 ` [Tarantool-patches] [PATCH 1/1] box: fixed box.info:memory() Olga Arkhangelskaia
2020-07-01 21:34 ` Igor Munkin
2020-07-02 10:01 ` Olga Arkhangelskaia
2020-07-09 1:08 ` Alexander Turenko
2020-07-09 13:57 ` Olga Arkhangelskaia
2020-07-15 14:40 ` Alexander Turenko
2020-07-16 17:56 ` Igor Munkin
2020-07-16 20:29 ` Olga Arkhangelskaia
2020-07-16 20:56 ` Alexander Turenko
2020-07-16 21:04 ` Igor Munkin
2020-07-17 6:38 ` Olga Arkhangelskaia
2020-07-01 21:34 ` [Tarantool-patches] [PATCH 0/1] fix box.info:memory() Igor Munkin
2020-07-09 1:08 ` Alexander Turenko
2020-07-09 14:02 ` Olga Arkhangelskaia
2020-07-16 18:16 ` Igor Munkin
2020-07-16 18:29 ` Alexander Turenko [this message]
2020-07-17 6:18 ` Kirill Yukhin
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=20200716182941.pbzrjxkwr7bftp6g@tkn_work_nb \
--to=alexander.turenko@tarantool.org \
--cc=imun@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 0/1] fix box.info:memory()' \
/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