forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
67 lines
24 KiB
HTML
67 lines
24 KiB
HTML
<a name="EN-US_TOPIC_0000001188323716"></a><a name="EN-US_TOPIC_0000001188323716"></a>
|
|
|
|
<h1 class="topictitle1">Common Performance Parameter Optimization Design</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p2047224881111">To improve the cluster performance, you can use multiple methods to optimize the database, including hardware configuration, software driver upgrade, and internal parameter adjustment of the database. This section describes some common parameters and recommended configurations.</p>
|
|
<ol id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_ol14312191921519"><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li133121619131511">query_dop<p id="EN-US_TOPIC_0000001188323716__p18940533113319"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li133121619131511"></a><a name="en-us_topic_0000001211922921_li133121619131511"></a>Set the user-defined query parallelism degree.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p1273184252814">The SMP architecture uses abundant resources to obtain time. After the plan parallelism is executed, more resources are consumed, including the CPU, memory, I/O, and network bandwidth. As the DOP grows, the resource consumption increases.</p>
|
|
<ul id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_ul167621748192816"><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li77621748102810">When resources become a bottleneck, the SMP cannot improve the performance and may even deteriorate the performance. In the case of a resource bottleneck, you are advised to disable the SMP.</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li72916534283">If resources are sufficient, the higher the DOP, the more the performance is improved.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p12472848181112">The SMP DOP can be configured at a session level and you are advised to enable the SMP before executing the query that meets the requirements. After the execution is complete, disable the SMP. Otherwise, SMP may affect services in peak hours.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p3472648121112">You can set <strong id="EN-US_TOPIC_0000001188323716__b1288254812405">query_dop</strong> to <strong id="EN-US_TOPIC_0000001188323716__b174831351194020">10</strong> to enable the SMP in a session.</p>
|
|
</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li118071144141919">enable_dynamic_workload<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p147314486116"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li118071144141919"></a><a name="en-us_topic_0000001211922921_li118071144141919"></a>Enable dynamic load management. Dynamic load management refers to the automatic queue control of complex queries based on user loads in a database. This fine-tunes system parameters without manual adjustment.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p1547319482113">This parameter is enabled by default. Notes:</p>
|
|
<ul id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_ul191071342186"><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li110814416181">A CN in the cluster is used as the Central Coordinator (CCN) for collecting and scheduling job execution. Its status will be displayed in <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b19668111516910">Central Coordinator State</strong>. If there is no CCN, jobs will not be controlled by dynamic load management.</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li9477912101817">Simple query jobs (which are estimated to require less than 32 MB memory) and non-DML statements (statements other than <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b83031925161119">INSERT</strong>, <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b15311152521119">UPDATE</strong>, <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b18312102501119">DELETE</strong>, and <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b631313254115">SELECT</strong>) have no adaptive load restrictions. Control the upper memory limits for them on a single CN using <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b165689398118">max_active_statements</strong>.</li><li id="EN-US_TOPIC_0000001188323716__li74778127186">In adaptive load scenarios, the value cannot be increased. If you increase it, memory cannot be controlled for certain statements, such as statements that have not been analyzed.</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li215084151814">Reduce concurrency in the following scenarios, because high concurrency may lead to uncontrollable memory usage.<ul id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_ul4473114810117"><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li18473184818111">A single tuple occupies excessive memory, for example, a base table contains a column more than 1 MB wide.</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li9473148101111">A query is fully pushed down.</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li4473548161118">A statement occupies a large amount of memory on the CN, for example, a statement that cannot be pushed down or a cursor withholding statement.</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li20473548101117">An execution plan creates a hash table based on the hash join operator, and the table has many duplicate values and occupies a large amount of memory.</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li2473348101118">UDFs are used, which occupy a large amount of memory.</li></ul>
|
|
</li></ul>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p164733488111">When configuring this parameter, you can set <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b1516915471161">query_dop</strong> to <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b19104165201611">0</strong> (adaptive). In this case, the system dynamically selects the optimal DOP between 1 and 8 for each query based on resource usage and plan characteristics. The <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b20303646182">enable_dynamic_workload</strong> parameter supports the dynamic memory allocation.</p>
|
|
</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li749462016218">max_active_statements<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p1847314818115"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li749462016218"></a><a name="en-us_topic_0000001211922921_li749462016218"></a>Specifies the maximum number of concurrent jobs. This parameter applies to all the jobs on one CN.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p154741148111119">Set the value of this parameter based on system resources, such as CPU, I/O, and memory resources, to ensure that the system resources can be fully utilized and the system will not be crashed due to excessive concurrent jobs.</p>
|
|
<ul id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_ul9474144851114"><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li142079223229">If this parameter is set to <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b256713218219">-1</strong> or <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b8865184112114">0</strong>, the number of global concurrent jobs is not limited.</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li1347424813115">In the point query scenario, you are advised to set this parameter to <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b19889182832116">100</strong>.</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li174741748191117">In an analytical query scenario, set this parameter to the number of CPU cores divided by the number of DNs. Generally, its value ranges from 5 to 8.</li></ul>
|
|
</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li9995163252217"><strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b1823113318220">session_timeout</strong><p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p84741548111115">By default, if a client is in idle state after connecting to a database, the client automatically disconnects from the database after the duration specified by the parameter.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__p184140354428"><strong id="EN-US_TOPIC_0000001188323716__b41171421194">Value range</strong>: an integer ranging from 0 to 86400. The minimum unit is second (s). <strong id="EN-US_TOPIC_0000001188323716__b151181621790">0</strong> means to disable the timeout. Generally, you are advised not to set this parameter to <strong id="EN-US_TOPIC_0000001188323716__b9293205896">0</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li15667105511125">The five parameters that affect the database memory are as follows:<div class="p" id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p4125185715124"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li15667105511125"></a><a name="en-us_topic_0000001211922921_li15667105511125"></a><strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b1863013672419">max_process_memory</strong>, <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b157710122414">shared_buffers</strong>, <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b38313134241">cstore_buffers</strong>, <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b77151716247">work_mem</strong>, and <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b18431112319244">maintenance_work_mem</strong><ul id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_ul184741489118"><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li20474194812111">max_process_memory<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p6474164811115"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li20474194812111"></a><a name="en-us_topic_0000001211922921_li20474194812111"></a><strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b3319135242419">max_process_memory</strong> is a logical memory management parameter. It is used to control the maximum available memory on a single CN or DN.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p24741448111111">Non-secondary DNs are automatically adapted. The formula is as follows: (Physical memory size) x 0.8/(1 + Number of primary DNs). If the result is less than 2 GB, 2 GB is used by default. The default size of the secondary DN is 12 GB.</p>
|
|
</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li144741648101110">shared_buffers<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p647414481114"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li144741648101110"></a><a name="en-us_topic_0000001211922921_li144741648101110"></a>Specifies the size of the shared memory used by GaussDB(DWS). If the value of this parameter is increased, GaussDB(DWS) requires more System V shared memory than the default system setting.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p1347424891114">You are advised to set <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b149631542285759">shared_buffers</strong> to a value less than 40% of the memory. It is used to scan row-store tables. Formula: <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b14382195917261">shared_buffers</strong> = (Memory of a single server/Number of DNs on a single server) x 0.4 x 0.25</p>
|
|
</li></ul>
|
|
<ul id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_ul8474848111117"><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li1475648161117">cstore_buffers<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_a89455377567f45b1ae13510f4a6cefc5"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li1475648161117"></a><a name="en-us_topic_0000001211922921_li1475648161117"></a>Specifies the size of the shared buffer used by column-store tables and column-store tables (ORC, Parquet, and CarbonData) of OBS and HDFS foreign tables.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__p10291741144815">Column-store tables use the shared buffer specified by <strong id="EN-US_TOPIC_0000001188323716__b29296481041318">cstore_buffers</strong> instead of that specified by <strong id="EN-US_TOPIC_0000001188323716__b101659790741318">shared_buffers</strong>. When column-store tables are mainly used, reduce the value of <strong id="EN-US_TOPIC_0000001188323716__b96015576341318">shared_buffers</strong> and increase that of <strong id="EN-US_TOPIC_0000001188323716__b109256747141318">cstore_buffers</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__p112929419481">Use <strong id="EN-US_TOPIC_0000001188323716__b201630746041318">cstore_buffers</strong> to specify the cache of ORC, Parquet, or CarbonData metadata and data for OBS or HDFS foreign tables. The metadata cache size should be 1/4 of <strong id="EN-US_TOPIC_0000001188323716__b81723059841318">cstore_buffers</strong> and not exceed 2 GB. The remaining cache is shared by column-store data and foreign table column-store data.</p>
|
|
</li></ul>
|
|
<ul id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_ul124751848141120"><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li1475114817117"><strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b196227711299">work_mem</strong><p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p18758194994511">Specifies the size of the memory used by internal sequential operations and the Hash table before data is written into temporary disk files.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p047554815117">Sort operations are required for <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b130912393319">ORDER BY</strong>, <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b03102323311">DISTINCT</strong>, and merge joins. Hash tables are used in hash joins, hash-based aggregation, and hash-based processing of <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b65488923319">IN</strong> subqueries.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p047594810113">In a complex query, several sort or hash operations may run in parallel. Each operation will be allowed to use as much memory as this parameter specifies. If the memory is insufficient, data will be written into temporary files. In addition, several running sessions may be performing such operations concurrently. Therefore, the total memory used may be many times the value of <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b1673714783413">work_mem</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p1147564819115">The formulas are as follows:</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p04751048191112">For non-concurrent complex serial queries, each query requires five to ten associated operations. Configure <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b1481018373518">work_mem</strong> using the following formula: <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b181723163512">work_mem</strong> = 50% of the memory/10.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p11475134815118">For non-concurrent simple serial queries, each query requires two to five associated operations. Configure <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b1211082093510">work_mem</strong> using the following formula: <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b16111172015350">work_mem</strong> = 50% of the memory/5.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p154756488114">For concurrent queries, configure <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b1971117347357">work_mem</strong> using the following formula: <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b4711103420358">work_mem</strong> = <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b9711173414354">work_mem</strong> for serial queries/Number of concurrent SQL statements.</p>
|
|
</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li8475104881110"><strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b6875627369">maintenance_work_mem</strong><p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p3476194871117">Specifies the maximum size of memory used for maintenance operations, involving <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b122194953685759">VACUUM</strong>, <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b78166363485759">CREATE INDEX</strong>, and <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b71848242485759">ALTER TABLE ADD FOREIGN KEY</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p12476648131119">Setting suggestions:</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p8476134811111">If you set this parameter to a value greater than that of <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b842352706202849">work_mem</strong>, database dump files can be cleaned up and restored more efficiently. In a database session, only one maintenance operation can be performed at a time. Maintenance is usually performed when there are not many sessions.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p4476164818118">When the automatic cleanup process is running, up to <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b102024591285759">autovacuum_max_workers</strong> times of the memory will be allocated. In this case, set <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b208366802585759">maintenance_work_mem</strong> to a value greater than or equal to that of <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b83064435985759">work_mem</strong>.</p>
|
|
</li></ul>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li848155713474"><strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b119213508418">bulk_write_ring_size</strong><p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p663217034816">Specifies the size of a ring buffer used for parallel data import.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p771216274811">This parameter affects the database import performance. You are advised to increase the value of this parameter on DNs when a large amount of data is to be imported.</p>
|
|
</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li123601954137">The following parameters affect the database connection:<div class="p" id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p75401463138"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li123601954137"></a><a name="en-us_topic_0000001211922921_li123601954137"></a><strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b11147143118436">max_connections</strong> and <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b942144117432">max_prepared_transactions</strong><ul id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_ul147734881116"><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li1247719485113">max_connections<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p1747724831111"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li1247719485113"></a><a name="en-us_topic_0000001211922921_li1247719485113"></a>Specifies the maximum number of concurrent connections to the database. This parameter affects the concurrent processing capability of the cluster.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p14477548101118">Setting suggestions:</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p16477104881120">Retain the default value of this parameter on CNs. Set this parameter on DNs to a value calculated using this formula: Number of CNs x Value of this parameter on a CN.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p20477148171115">If the value of this parameter is increased, GaussDB(DWS) may require more System V shared memory or semaphore, which may exceed the default maximum value of the OS. In this case, modify the value as needed.</p>
|
|
</li></ul>
|
|
</div>
|
|
<ul id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_ul14781548111120"><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li154780488114">max_prepared_transactions<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p12478648181115"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li154780488114"></a><a name="en-us_topic_0000001211922921_li154780488114"></a>Specifies the maximum number of transactions that can stay in the <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b9558195774919">prepared</strong> state simultaneously. If the value of this parameter is increased, GaussDB(DWS) requires more System V shared memory than the default system setting.</p>
|
|
</li></ul>
|
|
<div class="notice" id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_note19635173215019"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p176358328505">The value of <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b102804921985759">max_connections</strong> is related to <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b0622125595014">max_prepared_transactions</strong>. Before configuring <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b167058734385759">max_connections</strong>, ensure that the value of <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b174539558085759">max_prepared_transactions</strong> is greater than or equal to that of <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b166195198385759">max_connections</strong>. In this way, each session has a prepared transaction in the waiting state.</p>
|
|
</div></div>
|
|
</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li2094910576501">checkpoint_completion_target<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p11478348141112"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li2094910576501"></a><a name="en-us_topic_0000001211922921_li2094910576501"></a>Specifies the target for which the checkpoint is completed.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p6478748171114">Each checkpoint must be completed within 50% of the checkpoint interval.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p9478948101112">The default value is <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b5951134135318">0.5</strong>. To improve the performance, you can change the value to 0.9.</p>
|
|
</li><li id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li137841822115119">data_replicate_buffer_size<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p347834871114"><a name="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_li137841822115119"></a><a name="en-us_topic_0000001211922921_li137841822115119"></a>Specifies the memory used by queues when the sender sends data pages to the receiver. The value of this parameter affects the buffer size used for the replication from the primary server to the standby server.</p>
|
|
<p id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_p174780485110">The default value is <strong id="EN-US_TOPIC_0000001188323716__en-us_topic_0000001211922921_b179502561549">128 MB</strong>. If the server memory is 256 GB, you can increase the value to 512 MB.</p>
|
|
</li></ol>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0400.html">Performance Tuning</a></div>
|
|
</div>
|
|
</div>
|
|
|