Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd061ea2

Browse files
committed
Adjust DSM and DSA slot usage constants.
When running a lot of large parallel queries concurrently, or a plan witha lot of separate Gather nodes, it is possible to run out of DSM slots.There are better solutions to these problems requiring architecturalredesign work, but for now, let's adjust the constants so that it's moredifficult to hit the limit.1. Previously, a DSA area would create up to four segments at each sizebefore doubling the size. After this commit, it will create only two ateach size, so it ramps up faster and therefore needs fewer slots.2. Previously, the total limit on DSM slots allowed for 2 per connection.Switch to 5 per connection.Also remove an obsolete nearby comment.Author: Thomas MunroReviewed-by: Robert Haas, Andres FreundDiscussion:https://postre.es/m/CA%2BhUKGL6H2BpGbiF7Lj6QiTjTGyTLW_vLR%3DSn2tEBeTcYXiMKw%40mail.gmail.com
1 parenta069218 commitd061ea2

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

‎src/backend/storage/ipc/dsm.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,8 @@
4545

4646
#definePG_DYNSHMEM_CONTROL_MAGIC0x9a503d32
4747

48-
/*
49-
* There's no point in getting too cheap here, because the minimum allocation
50-
* is one OS page, which is probably at least 4KB and could easily be as high
51-
* as 64KB. Each currently sizeof(dsm_control_item), currently 8 bytes.
52-
*/
5348
#definePG_DYNSHMEM_FIXED_SLOTS64
54-
#definePG_DYNSHMEM_SLOTS_PER_BACKEND2
49+
#definePG_DYNSHMEM_SLOTS_PER_BACKEND5
5550

5651
#defineINVALID_CONTROL_SLOT((uint32) -1)
5752

‎src/backend/utils/mmgr/dsa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
* dsm.c's limits on total number of segments), or limiting the total size
7575
* an area can manage when using small pointers.
7676
*/
77-
#defineDSA_NUM_SEGMENTS_AT_EACH_SIZE4
77+
#defineDSA_NUM_SEGMENTS_AT_EACH_SIZE2
7878

7979
/*
8080
* The number of bits used to represent the offset part of a dsa_pointer.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp