Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: Leonid Vasiliev <lvasiliev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] sql: increase default cache size
Date: Fri, 11 Dec 2020 12:09:13 +0000	[thread overview]
Message-ID: <20201211120913.GB12730@tarantool.org> (raw)
In-Reply-To: <848e5b2fe5d1b8da491759a07abc035142280638.1607638829.git.lvasiliev@tarantool.org>

On 11 Dec 01:37, Leonid Vasiliev wrote:
> Increase the maximum number of in-memory pages to use
> for temporary tables.
> (https://www.sqlite.org/compile.html#default_cache_size)
> 
> Part of #5609
> ---
> 
> Hi SQL team. It is a simplest part of #5609.
> This patch increases the default SQL cache size by 10 times to 20 MB.
> A similar experiment shows a 10% performance increase for some datasets.
> (https://github.com/tarantool/tarantool/issues/5593#issuecomment-740044007).
> Mons approved these changes. I haven't done any research to determine the
> optimal value. So feel free to throw this patch away.

Hi, why not inroduce separate handler for user to change this setting?
Since SQLite is embedded database, almost all settings are set at
compile time. In constrast, we can move it to the box.
 
> https://github.com/tarantool/tarantool/issues/5609
> https://github.com/tarantool/tarantool/tree/lvasiliev/gh-5609-increase-default-sql-sort-cache-size
> 
>  src/box/CMakeLists.txt | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt
> index 19203f7..7372179 100644
> --- a/src/box/CMakeLists.txt
> +++ b/src/box/CMakeLists.txt
> @@ -218,6 +218,10 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
>    add_definitions(-DSQL_DEBUG=1)
>  endif()
>  add_definitions(-DSQL_TEST=1)
> +# Set the maximum number of in-memory pages to use for temporary tables.
> +# 20000 * 1024 = 20480000 bytes.
> +# (https://www.sqlite.org/compile.html#default_cache_size)
> +add_definitions(-DSQL_DEFAULT_CACHE_SIZE=-20000)
>  
>  set(EXT_SRC_DIR ${CMAKE_SOURCE_DIR}/extra)
>  set(EXT_BIN_DIR ${CMAKE_BINARY_DIR}/extra)
> -- 
> 2.7.4
> 

  reply	other threads:[~2020-12-11 12:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 22:37 Leonid Vasiliev
2020-12-11 12:09 ` Nikita Pettik [this message]
2020-12-11 15:29   ` Leonid Vasiliev
2020-12-24 16:57     ` Nikita Pettik
2020-12-28  8:54       ` Leonid Vasiliev
2020-12-28 12:13         ` Nikita Pettik
2020-12-30 13:02           ` Leonid Vasiliev
2020-12-11 14:12 ` Sergey Ostanevich
2020-12-11 15:24   ` Leonid Vasiliev

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=20201211120913.GB12730@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=lvasiliev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] sql: increase default cache 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