Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Commit 2752233

Browse files
committed
Merge branch 'nik-texts-g001' into 'master'
Adjust C&R texts in G001 See merge request postgres-ai/postgres-checkup!366
2 parents 1f4f60d + 1f976f7 commit 2752233

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed
Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,34 @@
11
package g001
22

3-
const MSG_SHARED_BUFFERS_NOT_OPTIMAL_CONCLUSION string = "[P1] shared_buffers value is far from optimal: \n%s. \n"
4-
const MSG_SHARED_BUFFERS_NOT_OPTIMAL_RECOMMENDATION string = "[P1] shared_buffers value is far from optimal. Consider conducting experiments in a special environment (a clone of production DB, replayed or simulated production workload) to find optimal `shared_buffers` values for each server. Recommended values of `shared_buffers`: \n%s \n"
5-
const MSG_HOST_CONCLUSION_HIGH string = " - server `%s` has %s of RAM, while `shared_buffers` is set to %s, or %d%% of RAM – it is too high, so memory might not be enough, and [OOM killer](https://en.wikipedia.org/wiki/Out_of_memory) might kill Postgres processes since swap is disabled"
6-
const MSG_HOST_CONCLUSION_LOW string = " - server `%s` has %s of RAM, while `shared_buffers` is set to %s, or %d%% of RAM – it is too low, so Postgres performance on this server is sub-optimal"
7-
const MSG_HOST_RECOMMENDATION string = " - server `%s`: %s (%d%%) or a value between %s (%d%%) and %s (%d%%)"
8-
const MSG_TUNE_SHARED_BUFFERS_RECOMMENDATION string = "Useful links related to `shared_buffers` tuning: \n" +
9-
" - [PostgreSQL documentation. 19.4. Resource Consumption](https://www.postgresql.org/docs/current/runtime-config-resource.html) \n" +
10-
" - [Tuning Your PostgreSQL Server](https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server#shared_buffers) (PostgreSQL Wiki) \n" +
11-
" - [annotated.conf](https://github.com/jberkus/annotated.conf) (Josh Berkus, 2018) \n"
3+
const MSG_SHARED_BUFFERS_NOT_OPTIMAL_CONCLUSION string = "[P1] Buffer pool size (`shared_buffers`) is far from optimal:\n%s.\n"
4+
const MSG_SHARED_BUFFERS_NOT_OPTIMAL_RECOMMENDATION string = "[P1] Buffer pool size (`shared_buffers`) value is far from optimal. " +
5+
"Consider conducting experiments in a special environment (a clone of production DB, replayed or simulated production workload) " +
6+
"to find optimal `shared_buffers` values for each server. Recommended values of `shared_buffers`:\n%s.\n"
7+
const MSG_HOST_CONCLUSION_HIGH string = " - server `%s` has %s of RAM, while `shared_buffers` is set to %s, or %d%% of RAM – it is too high, " +
8+
"so memory might not be enough, and [OOM killer](https://en.wikipedia.org/wiki/Out_of_memory) might kill Postgres processes if swapping is disabled."
9+
const MSG_HOST_CONCLUSION_LOW string = " - server `%s` has %s of RAM, while `shared_buffers` is set to %s, or %d%% of RAM – it is too low, " +
10+
"so it is very likely that Postgres performance is now sub-optimal."
11+
const MSG_HOST_RECOMMENDATION string = " - server `%s`: %s (%d%%) or a value between %s (%d%%) and %s (%d%%)"
12+
const MSG_TUNE_SHARED_BUFFERS_RECOMMENDATION string = "Useful links related to buffer pool tuning:\n" +
13+
" - [PostgreSQL documentation. 19.4. Resource Consumption](https://www.postgresql.org/docs/current/runtime-config-resource.html)\n" +
14+
" - [Tuning Your PostgreSQL Server](https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server#shared_buffers) (PostgreSQL Wiki)\n" +
15+
" - [annotated.conf](https://github.com/jberkus/annotated.conf) (Josh Berkus, 2018)\n"
1216

13-
const MSG_OOM_BASE_CONCLUSION string = "[P1] Potentially high risks of OOM. Memory-related settings on `%s` server look dangerous: there are potentially" +
14-
" high risks to have [OOO (out of memory)](https://en.wikipedia.org/wiki/Out_of_memory). \n"
15-
const MSG_OOM_BASE_RECOMMENDATION string = "[P1] Potentially high risks of OOM. Reconsider memory-related settings to minimize risks of OOM. \n"
16-
const MSG_TUNE_MEMORY_RECOMMENDATION string = "Useful links related to memory-related settings: \n" +
17-
" - [PostgreSQL documentation. 19.4. Resource Consumption](https://www.postgresql.org/docs/current/runtime-config-resource.html) \n"
17+
const MSG_OOM_BASE_CONCLUSION string = "[P1] Potentially high risks of OOM. Memory-related settings on `%s` server look risky: there are potentially " +
18+
"high risks to have [OOO (out of memory)](https://en.wikipedia.org/wiki/Out_of_memory).\n"
19+
const MSG_OOM_BASE_RECOMMENDATION string = "[P1] Potentially high risks of OOM. Reconsider memory-related settings to minimize risks of OOM.\n"
20+
const MSG_TUNE_MEMORY_RECOMMENDATION string = "Useful links related to memory-related settings:\n" +
21+
" - [PostgreSQL documentation. 19.4. Resource Consumption](https://www.postgresql.org/docs/current/runtime-config-resource.html)\n"
1822

19-
const MSG_OOM_SWAP_ENABLED string = "Since swapping is enabled (see A001), it might lead to significant performance degradation. \n"
20-
const MSG_OOM_SWAP_DISABLED string = "Since swapping is disabled (see A001), it might lead to Postgres crashes due to OOM killer activity. \n"
23+
const MSG_OOM_SWAP_ENABLED string = "Since swapping is enabled (see A001), it might lead to significant performance degradation.\n"
24+
const MSG_OOM_SWAP_DISABLED string = "Since swapping is disabled (see A001), it might lead to Postgres crashes due to OOM killer's activity.\n"
2125
const MSG_OOM_SHARED_BUFFERS string = "`shared_buffers` is set to %s, which is %d%%%% of RAM, making this setting a major contributor to overall memory consumption. \n"
2226
const MSG_OOM_WORK_MEM_CONNECTIONS string = "`work_mem` is set to %s, and each DB session may use up to this value of memory multiple times " +
23-
"(for example, if multiple ordering operations are needed), so in case Postgres backends is maxed out (`max_connections` value is %d), " +
24-
"all backends might consume, say, `max_connections * 2 * work_mem = %s`, which is %d%%%% of RAM, making `work_mem/max_connections` " +
25-
"pair a major contributor to the overall memory consumption. \n"
27+
"(for example, if multiple ordering operations with massive data sets are needed), so in case Postgres backends is maxed out " +
28+
"(`max_connections` value is %d), all backends might consume, say, `max_connections * 2 * work_mem = %s`, which is %d%%%% of RAM. " +
29+
"It makes `work_mem/max_connections` pair a major contributor to the overall memory consumption.\n"
2630
const MSG_OOM_AUTIVACUUM_WORKMEM_BEGIN string = "`autovacuum_work_mem` is %s"
2731
const MSG_OOM_AUTIVACUUM_WORKMEM_NOTSET string = "(it's set to `-1` so the actual value is inherited from `maintenance_work_mem`)"
28-
const MSG_OOM_AUTIVACUUM_WORKMEM_END string = "and maximum %d autovacuum workers may work simultaneously, so together they may consume up to %s," +
29-
" it is %d%%%% of RAM, making `autovacuum_work_mem/autovacuum_max_workers` pair a major contributor to the overall memory consumption. \n"
30-
const MSG_OOM_BASE_RECOMMENDATION_DETAIL string = "First of all, pay attention to the following settings: \n"
32+
const MSG_OOM_AUTIVACUUM_WORKMEM_END string = "and maximum %d autovacuum workers may work simultaneously, so together they may consume up to %s, " +
33+
"or %d%%%% of RAM. It makes `autovacuum_work_mem/autovacuum_max_workers` pair a major contributor to the overall memory consumption.\n"
34+
const MSG_OOM_BASE_RECOMMENDATION_DETAIL string = "First of all, pay attention to the following settings:\n"

0 commit comments

Comments
 (0)