Rate This Document
Findability
Accuracy
Completeness
Readability

Feature Tuning

You can adjust KOVAE parameter configurations to improve server performance.

This section provides tuning suggestions for memory parameters, thread parameters, and hash parameters, as shown in Table 1, Table 2, and Table 3.

Table 1 Tuning suggestions for memory parameters

Parameter

Description

Tuning Suggestion

kovae_memory_max_size

When memory control is enabled, a larger value of this parameter indicates that more parallel queries are supported and a larger value of kovae_memory_buffer_size can be set.

When the memory is sufficient, you are advised to set a larger value of kovae_memory_max_size.

kovae_memory_buffer_size

If drive flushing operators (such as the Sort, Aggregation, HashJoin, and Materialize operators) exist in a query while the query table contains a large amount of data, this parameter has a significant impact on the performance.

A larger value of this parameter usually indicates a better performance. However, when memory control is disabled, an excessive value of this parameter may trigger out of memory (OOM). When memory control is enabled, an excessive value of this parameter may trigger insufficient memory that causes query failures. You are advised to set the value of this parameter to 10% of the KOVAE maximum available memory.

kovae_serial_mode

When memory control is enabled and only one client is executing queries, this parameter (the serial mode) can be enabled to improve query performance.

After the serial mode is enabled, KOVAE automatically adjusts the cache size of drive flushing operators to minimize data flushing.

Table 2 Tuning suggestions for thread parameters

Parameter

Description

Tuning Suggestion

kovae_threadpool_size

Indicates the maximum number of threads that can be reserved in the thread pool.

You are advised to set the value of this parameter to three to five times the number of available CPU cores.

kovae_parallel_threads

Indicates the maximum number of working threads that can be requested in a single parallel query.

The default value is 2. When the number of sessions is small (that is, the number of sessions is less than 5), you are advised to set the value of this parameter to the number of available CPU cores. Generally, the parameter can be set to the value of kovae_threadpool_size/Number of parallel queries and sessions that are simultaneously executed with a high probability.

kovae_threadpool_stalltime

When the thread usage reaches the upper limit, a smaller value of this parameter indicates a better overall performance. However, a new query request will wait for a longer time and starvation occurs.

To gain a better overall performance, you can decrease the value of kovae_threadpool_stalltime.

innodb_parallel_read_threads

Indicates the number of threads that concurrently read a table.

If the number of sessions is small, increase the value of this parameter to accelerate the query. You are advised to set the parameter to the value of Number of available CPU cores/Number of parallel queries and sessions that are simultaneously executed with a high probability.

Table 3 Tuning suggestions for hash parameters

Parameter

Description

Tuning Suggestion

kovae_aggregator_hash_type

Indicates the working mode of the Agg operator during hash grouping.

If the number of groups in the group by column is small, you can set the value of kovae_aggregator_hash_type to 1 to improve the query speed.

Table 4 Typical configurations (example hardware environment: Kunpeng 920 7265 processor + 512 GB memory + 1 TB hard drive)

Parameter

Typical Configuration Value

Configuration Description

kovae_threadpool_size

256

Set the value of this parameter to twice the number of CPU cores. For example, in the Kunpeng 920 7265 processor 2P server scenario, set the value to 128 (cores) x 2 = 256.

kovae_parallel_threads

64

Set the value of this parameter to the value of kovae_threadpool_size/Number of connections. For example, if there are four connections in a common OLAP scenario, set the value to kovae_threadpool_size/4 = 64.

innodb_parallel_read_threads

32

Set the value of this parameter to the value of Number of CPU cores/Number of connections. For example, if there are four connections in a common AP scenario, set the value to 128/4 = 64.

kovae_memory_max_size

200 x 1024 x 1024 x 1024 = 200 GB

Set the value constraint relationship as: MySQL innodb_buffer_pool_size + kovae_memory_max_size ≤ 70% of the physical machine memory.

For example, 512 GB memory of a physical machine x 70% is 358.4 GB. The typical value of innodb_buffer_pool_size for a 100 GB TPC-H database is 150 GB. Therefore, the typical value of kovae_memory_max_size is 200 GB.

kovae_memory_buffer_size

20 x 1024 x 1024 x 1024 = 20 GB

Set the value of this parameter to 10% of the kovae_memory_max_size value.

Other parameters

Retain the default value.

-