MySQL 26.7.0
Source Code Documentation
tune.h
Go to the documentation of this file.
1// Copyright (c) 2026, Oracle and/or its affiliates.
2//
3// This program is free software; you can redistribute it and/or modify
4// it under the terms of the GNU General Public License, version 2.0,
5// as published by the Free Software Foundation.
6//
7// This program is designed to work with certain software (including
8// but not limited to OpenSSL) that is licensed under separate terms,
9// as designated in a particular file or component or in included license
10// documentation. The authors of MySQL hereby grant you an additional
11// permission to link the program and your derivative works with the
12// separately licensed software that they have either included with
13// the program or referenced in the documentation.
14//
15// This program is distributed in the hope that it will be useful,
16// but WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License, version 2.0, for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with this program; if not, write to the Free Software
22// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
23
24#ifndef MYSQL_CSA_TUNE_H
25#define MYSQL_CSA_TUNE_H
26
27#include "sql/sql_class.h"
28
29namespace mysql::csa::tune {
30
31// resource tracking
32inline constexpr bool enabled_resource_tracking{true};
33// session
34inline constexpr std::size_t csa_session_default_cache_size{2048};
35// scheduler
36inline constexpr std::size_t scheduler_clock_capacity{16384};
37inline constexpr std::size_t scheduler_tp_queue_size{8192};
38// max task number = factor * number of threads
39static constexpr std::size_t scheduler_max_task_number_factor = 4;
40// prefetcher
41inline constexpr bool prefetcher_enable{false};
42inline constexpr bool csa_prefetcher_simple_queue{false};
43inline constexpr std::size_t prefetcher_queue_max_size{128};
44inline constexpr std::size_t prefetcher_batch_size{100 * 1024};
45// provider
46inline constexpr std::size_t provider_max_read_event_bytes{512};
47inline constexpr std::size_t provider_max_read_payload_bytes{512};
48inline constexpr bool csa_provider_enable_tune{true};
49inline constexpr bool extended_statistics_enabled{false};
50
51void csa_show_config_info(const char *channel_name);
52
53} // namespace mysql::csa::tune
54
55#endif // MYSQL_CSA_TUNE_H
Definition: tune.cpp:27
constexpr bool extended_statistics_enabled
Definition: tune.h:49
constexpr bool prefetcher_enable
Definition: tune.h:41
constexpr bool enabled_resource_tracking
Definition: tune.h:32
static constexpr std::size_t scheduler_max_task_number_factor
Definition: tune.h:39
constexpr std::size_t csa_session_default_cache_size
Definition: tune.h:34
constexpr std::size_t prefetcher_batch_size
Definition: tune.h:44
constexpr std::size_t scheduler_tp_queue_size
Definition: tune.h:37
constexpr bool csa_provider_enable_tune
Definition: tune.h:48
constexpr bool csa_prefetcher_simple_queue
Definition: tune.h:42
constexpr std::size_t prefetcher_queue_max_size
Definition: tune.h:43
constexpr std::size_t provider_max_read_payload_bytes
Definition: tune.h:47
void csa_show_config_info(const char *channel_name)
Definition: tune.cpp:35
constexpr std::size_t scheduler_clock_capacity
Definition: tune.h:36
constexpr std::size_t provider_max_read_event_bytes
Definition: tune.h:46