AlloyDB Omni performance tuning parameters on a VM
Stay organized with collections
Save and categorize content based on your preferences.
This 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.
Most default PostgreSQL parameter values remain unchanged, because the changes are limited to parameters that benefit the majority of applications.
The suggested values of these parameters should generally improve performance
on modern hardware.
Database parameter
AlloyDB Omni default
Suggested setting
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 for smaller machines 2 GB for larger machines
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
128 to 512 MB, depending on workload and the amount of memory available
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-25 UTC."],[[["This document outlines performance tuning parameters specifically for AlloyDB Omni on a VM, based on various workload tests."],["The suggested parameter changes focus on improving performance for most applications on modern hardware, while keeping most default PostgreSQL parameter values unchanged."],["Key parameters to adjust include `random_page_cost`, `temp_buffers`, `max_wal_size`, `min_wal_size`, `default_toast_compression`, and several memory-related settings like `maintenance_work_mem` and `work_mem`."],["The tuning parameters for `max_worker_processes`, `max_parallel_workers`, and `max_parallel_workers_per_gather` should be adjusted based on the number of vCPUs."],["The `effective_cache_size` parameter is recommended to be set to 80% of DRAM, and `work_mem` should be adjusted from 128 to 512 MB depending on workload and memory availability."]]],[]]