Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH v2 4/4] Allow to configure TX fiber pool size
Date: Tue, 24 Apr 2018 18:43:39 +0300	[thread overview]
Message-ID: <20180424154339.mcziekbdd5atfliq@esperanza> (raw)
In-Reply-To: <cf69dbb936b8d238c5c57950f2783b03a9c013bc.1524502856.git.v.shpilevoy@tarantool.org>

On Mon, Apr 23, 2018 at 08:05:04PM +0300, Vladislav Shpilevoy wrote:
> TX fiber pool size provides fibers to execute transactions and
> remote requests, so it is linked with maximal remote request
> count, that is allowed to be altered in the previous patch. Lets
> do the same for fiber pool size.
> 
> Follow up #3320
> ---

I don't think that having a separate option for configuring the fiber
pool size is reasonable, because iproto_msg_max and fiber_pool_size are
interconnected. For example, it's pointless to set iproto_msg_max to
1000 and fiber_pool_size to 100 or vice versa. I guess we should leave
just one option that would tweak both iproto_msg_max and fiber_pool_size
under the hood. Not sure about that though.

>  src/box/box.cc                  |  9 ++++++++-
>  src/box/lua/load_cfg.lua        |  2 ++
>  src/fiber_pool.h                |  6 +++++-
>  test/box/fat_tx.lua             | 30 ++++++++++++++++++++++++++++
>  test/box/request_limit.result   | 43 +++++++++++++++++++++++++++++++++++++++++
>  test/box/request_limit.test.lua | 15 ++++++++++++++
>  6 files changed, 103 insertions(+), 2 deletions(-)
>  create mode 100644 test/box/fat_tx.lua
> 
> diff --git a/src/box/box.cc b/src/box/box.cc
> index 80684ad48..d2552709a 100644
> --- a/src/box/box.cc
> +++ b/src/box/box.cc
> @@ -1716,8 +1716,15 @@ box_is_configured(void)
>  static inline void
>  box_cfg_xc(void)
>  {
> +	int fiber_pool_size =
> +		cfg_geti_default("fiber_pool_size", FIBER_POOL_SIZE_DEFAULT);
> +	if (fiber_pool_size < FIBER_POOL_SIZE_MIN) {
> +		tnt_raise(ClientError, ER_CFG, "fiber_pool_size",
> +			  tt_sprintf("minimal value is %d",
> +				     FIBER_POOL_SIZE_MIN));
> +	}
>  	/* Join the cord interconnect as "tx" endpoint. */
> -	fiber_pool_create(&tx_fiber_pool, "tx", FIBER_POOL_SIZE,
> +	fiber_pool_create(&tx_fiber_pool, "tx", fiber_pool_size,
>  			  FIBER_POOL_IDLE_TIMEOUT);

Can't you make this option dynamic?

  reply	other threads:[~2018-04-24 15:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 17:05 [PATCH v2 0/4] IProto fixes and iproto_msg_max option Vladislav Shpilevoy
2018-04-23 17:05 ` [PATCH v2 1/4] iproto: fix error with input discarding Vladislav Shpilevoy
2018-04-24 15:35   ` Vladimir Davydov
2018-04-23 17:05 ` [PATCH v2 2/4] iproto: fix error with unstoppable batching Vladislav Shpilevoy
2018-04-24 15:36   ` Vladimir Davydov
2018-04-23 17:05 ` [PATCH v2 3/4] iproto: allow to configure IPROTO_MSG_MAX Vladislav Shpilevoy
2018-04-23 17:05 ` [PATCH v2 4/4] Allow to configure TX fiber pool size Vladislav Shpilevoy
2018-04-24 15:43   ` Vladimir Davydov [this message]
2018-04-24 17:33     ` [tarantool-patches] " Vladislav Shpilevoy

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=20180424154339.mcziekbdd5atfliq@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [PATCH v2 4/4] Allow to configure TX fiber pool size' \
    /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