From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [94.100.177.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 0C70245C304 for ; Fri, 11 Dec 2020 17:12:36 +0300 (MSK) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) From: Sergey Ostanevich In-Reply-To: <848e5b2fe5d1b8da491759a07abc035142280638.1607638829.git.lvasiliev@tarantool.org> Date: Fri, 11 Dec 2020 17:12:32 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <75697D98-9AA4-42DE-BF05-BADD3CEF4520@tarantool.org> References: <848e5b2fe5d1b8da491759a07abc035142280638.1607638829.git.lvasiliev@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] sql: increase default cache size List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leonid Vasiliev Cc: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org Hi! Thanks for the patch! Since the memory allocation is done on per-request basis, there=E2=80=99s no impact on the memory consumption beyond these = requests. Still it gives a real boost, so LGTM. Create follow-up ticket to provide a user-visible runtime option under box.cfg Sergos > On 11 Dec 2020, at 01:37, Leonid Vasiliev = wrote: >=20 > Increase the maximum number of in-memory pages to use > for temporary tables. > (https://www.sqlite.org/compile.html#default_cache_size) >=20 > Part of #5609 > --- >=20 > 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. >=20 > https://github.com/tarantool/tarantool/issues/5609 > = https://github.com/tarantool/tarantool/tree/lvasiliev/gh-5609-increase-def= ault-sql-sort-cache-size >=20 > src/box/CMakeLists.txt | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > 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=3D1) > endif() > add_definitions(-DSQL_TEST=3D1) > +# Set the maximum number of in-memory pages to use for temporary = tables. > +# 20000 * 1024 =3D 20480000 bytes. > +# (https://www.sqlite.org/compile.html#default_cache_size) > +add_definitions(-DSQL_DEFAULT_CACHE_SIZE=3D-20000) >=20 > set(EXT_SRC_DIR ${CMAKE_SOURCE_DIR}/extra) > set(EXT_BIN_DIR ${CMAKE_BINARY_DIR}/extra) > --=20 > 2.7.4 >=20