Tune the columnar engine for AlloyDB Omni on a VM

This document describes how to tune the columnar engine for an AlloyDB Omni on a VM. This document assumes that you are familiar with PostgreSQL.

Adjust the CPU resources for maintenance tasks (:#adjust-cpu-resources)

This example configures the columnar engine to use 50% of the CPU cores.

google_job_scheduler.maintenance_cpu_percentage = 50

Columnar engine uses up to 20% of CPU cores for background maintenance jobs, such as population, refresh, and recommendation. To adjust the CPU resources to allow for maintenance tasks, set the google_job_scheduler.maintenance_cpu_percentage flag to a value from 20 to 100. The default value is 20. The lowest CPU utilization for background maintenance tasks is 1 vCPU.

Increase the speed of worker processes (:#increase-speed-worker-process)

This example sets four worker processes.

google_job_scheduler.max_parallel_workers_per_job = 4

The columnar engine uses up to two worker processes for population and refresh background jobs. To increase the speed of these operations, set the following flag to increase the number of worker processes for background jobs. The default setting is 2 worker processes. These processes run on limited CPU resources as specified in the google_job_scheduler.maintenance_cpu_percentage flag. This flag does not require the database to be restarted.

Change the auto-columnarization schedule

This example sets the auto-columnarization schedule to six hours.

google_columnar_engine.auto_columnarization_schedule = 'EVERY 6 HOURS'

The auto-columnarization schedule can be set in the google_columnar_engine.auto_columnarization_schedule flag based upon anticipated scan-heavy workloads. Specify one or more hours for this flag. Changing the value of this flag does not require a database restart.

Manually populate the columnar engine

This example lets you only manually populate the columnar engine.

google_columnar_engine.enable_auto_columnarization = OFF

If you prefer to only manually populate the columnar engine, set the google_columnar_engine.enable_auto_columnarization flag to OFF. By default, the flag is set to ON. Changing the value of this flag does not require a database restart. See Manage Content Manually section for more details.