La maggior parte dei valori dei parametri PostgreSQL predefiniti rimane invariata, perché le modifiche sono limitate ai parametri che avvantaggiano la maggior parte delle applicazioni.
I valori suggeriti di questi parametri dovrebbero generalmente migliorare il rendimento
sull'hardware moderno.
Parametro del database
Impostazione predefinita di AlloyDB Omni
Impostazione consigliata
random_page_cost
4.0
1.1
temp_buffers
8 MB
128 MB
max_wal_size
1 GB
20 GB
min_wal_size
80 MB
10 GB
default_toast_compression
pglz
lz4
maintenance_work_mem
64 MB
1 GB per macchine più piccole, 2 GB per macchine più grandi
max_worker_processes
64
max(64, # vCPUs)
max_parallel_workers
8
max(8, # vCPUs)
max_parallel_workers_per_gather
2
max(2, # vCPUs / 2)
work_mem
4 MB
Da 128 a 512 MB, a seconda del workload e della quantità di memoria disponibile
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eThis document outlines performance tuning parameters specifically for AlloyDB Omni on a VM, based on various workload tests.\u003c/p\u003e\n"],["\u003cp\u003eThe suggested parameter changes focus on improving performance for most applications on modern hardware, while keeping most default PostgreSQL parameter values unchanged.\u003c/p\u003e\n"],["\u003cp\u003eKey parameters to adjust include \u003ccode\u003erandom_page_cost\u003c/code\u003e, \u003ccode\u003etemp_buffers\u003c/code\u003e, \u003ccode\u003emax_wal_size\u003c/code\u003e, \u003ccode\u003emin_wal_size\u003c/code\u003e, \u003ccode\u003edefault_toast_compression\u003c/code\u003e, and several memory-related settings like \u003ccode\u003emaintenance_work_mem\u003c/code\u003e and \u003ccode\u003ework_mem\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe tuning parameters for \u003ccode\u003emax_worker_processes\u003c/code\u003e, \u003ccode\u003emax_parallel_workers\u003c/code\u003e, and \u003ccode\u003emax_parallel_workers_per_gather\u003c/code\u003e should be adjusted based on the number of vCPUs.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eeffective_cache_size\u003c/code\u003e parameter is recommended to be set to 80% of DRAM, and \u003ccode\u003ework_mem\u003c/code\u003e should be adjusted from 128 to 512 MB depending on workload and memory availability.\u003c/p\u003e\n"]]],[],null,["# AlloyDB Omni performance tuning parameters on a VM\n\nSelect a documentation version: 15.7.1keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/performance-tuning-parameters)\n- [16.8.0](/alloydb/omni/16.8.0/docs/performance-tuning-parameters)\n- [16.3.0](/alloydb/omni/16.3.0/docs/performance-tuning-parameters)\n- [15.12.0](/alloydb/omni/15.12.0/docs/performance-tuning-parameters)\n- [15.7.1](/alloydb/omni/15.7.1/docs/performance-tuning-parameters)\n- [15.7.0](/alloydb/omni/15.7.0/docs/performance-tuning-parameters)\n\n\u003cbr /\u003e\n\nThis document describes performance tuning parameters that can improve AlloyDB Omni performance on a VM. These suggested tuning parameters are based on the results of running a set of workloads that exhibit different read and write patterns, caching behaviors, and index access patterns.\n\n\u003cbr /\u003e\n\nMost default PostgreSQL parameter values remain unchanged, because the changes are limited to parameters that benefit the majority of applications.\nThe suggested values of these parameters should generally improve performance\non modern hardware."]]