AlloyDB Omni is deployed through a Docker image, which allows different forms of customization.
This page shows some of the common customizations that are used.
To get started quickly
with AlloyDB Omni using the default configuration, see
Quickstart: AlloyDB Omni.
Before you begin
The following table lists recommended hardware and software configuration for AlloyDB Omni.
OS/Platform
Recommended hardware configuration
Recommended software configuration
Linux
x86-64 or Arm (*) CPU with AVX2 support
8GB of RAM for every CPU allocated to AlloyDB Omni
20+ GB of disk space
Debian based OS (Ubuntu, etc.) or RHEL 9
Linux kernel version 6.1 or higher or any Linux kernel version older than 5.3 that has support for the MADV_COLLAPSE and MADV_POPULATE_WRITE directives
Cgroupsv2 enabled
Docker Engine 25.0.0+ or Podman 5.0.0+
macOS
Intel CPU with AVX2 support or M-chip
8GB of RAM for every CPU allocated to AlloyDB Omni
AlloyDB Omni runs in a container. Install a container runtime like Docker or Podman on your machine before installing AlloyDB Omni.
Single-server
Mount an external data directory
By default, the command in the Quickstart: Install AlloyDB Omni stores the database data in an area managed by Docker. This is convenient for getting started but makes it difficult to find and use the data directory. Instead, you can set up a bind mount to map the data directory to a known location on your disk.
CONTAINER_NAME: The name to assign this new AlloyDB Omni container in your host machine's container registry—for example, my-omni.
NEW_PASSWORD: The password assigned the new container's postgres user after its creation.
DATA_DIR: The file system path that you want AlloyDB Omni to use for its data directory.
HOST_PORT: The TCP port on the host machine that the container should publish its own port 5432 to. To use the PostgreSQL default port on the host machine as well, specify 5432.
Enable ulimits
The ulimit parameters specify various process limits that the Docker container is allowed to use. For optimal performance, AlloyDB Omni adjusts process priorities to allow critical PostgreSQL processes to run with higher priority, that is they get a bigger allocation of available CPUs. To allow this, specify -20:-20, which removes limitations for the AlloyDB Omni container.
By default, Docker does not perform log rotations. This can use up a lot of disk space, and eventually lead to disk space exhaustion. You can configure Docker to use a different logging driver. For example, to log to journald:
For more information about Docker and logging drivers, refer to Docker's documentation Configure logging drivers.
You can also configure logging using PostgreSQL. For more information, refer to PostgreSQL documentation Error reporting and logging.
Mount a shared memory volume
If you plan to use the AlloyDB columnar engine
with AlloyDB Omni, we recommend making shared memory
available to the AlloyDB Omni container. The method for doing
this differs depending upon your host operating system, as shown in the
following examples.
Linux
To make shared memory available to the container, mount /dev/shm:
Replace SHARED_MEMORY_SIZE with the size to set for /dev/shm on the
container, in the format described on Running containers.
For example, to specify one gigabyte, use the value 1g.
For example, if the google_job_scheduler.max_parallel_workers_per_job database
flag is set to its default value of 2, consider adding a flag of --shm-size=500m or greater when starting your database server.
[[["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-08-28 UTC."],[[["\u003cp\u003eAlloyDB Omni is deployed via a Docker image and requires a container runtime like Docker or Podman to be installed on your machine.\u003c/p\u003e\n"],["\u003cp\u003eRecommended configurations for AlloyDB Omni include having an x86-64 or Arm CPU with AVX2 support, 8GB of RAM per allocated CPU, and at least 20GB of disk space, with specific OS and software version recommendations for Linux and macOS.\u003c/p\u003e\n"],["\u003cp\u003eFor better data management, mount an external data directory using the \u003ccode\u003e-v\u003c/code\u003e flag in the \u003ccode\u003edocker run\u003c/code\u003e command, mapping the host's file system path to the container's data directory.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure optimal performance, configure the Docker container to allow higher process priorities for PostgreSQL by specifying \u003ccode\u003e--ulimit=nice=-20:-20\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eWhen utilizing the columnar engine, it is recommended to make shared memory available to the container by mounting \u003ccode\u003e/dev/shm\u003c/code\u003e in Linux or using the \u003ccode\u003e--shm-size\u003c/code\u003e flag in macOS, adjusting the shared memory size based on the \u003ccode\u003egoogle_job_scheduler.max_parallel_workers_per_job\u003c/code\u003e flag.\u003c/p\u003e\n"]]],[],null,["# Customize your AlloyDB Omni installation\n\nSelect a documentation version: 15.5.4keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/install)\n- [16.8.0](/alloydb/omni/16.8.0/docs/install)\n- [16.3.0](/alloydb/omni/16.3.0/docs/install)\n- [15.12.0](/alloydb/omni/15.12.0/docs/install)\n- [15.7.1](/alloydb/omni/15.7.1/docs/install)\n- [15.7.0](/alloydb/omni/15.7.0/docs/install)\n- [15.5.5](/alloydb/omni/15.5.5/docs/install)\n- [15.5.4](/alloydb/omni/15.5.4/docs/install)\n- [15.5.2](/alloydb/omni/15.5.2/docs/install)\n\n\u003cbr /\u003e\n\n| **Note:** Your use of AlloyDB Omni is subject to the agreement between you and Google that governs Google Cloud offerings. If you do not have a Google Cloud account, or have not otherwise entered into an agreement with Google that governs Google Cloud offerings, please do not proceed or download this software until you have done so. To create a Google Cloud account, see [the Google Cloud homepage](/docs/get-started).\n\n\u003cbr /\u003e\n\nAlloyDB Omni is deployed through a Docker image, which allows different forms of customization.\nThis page shows some of the common customizations that are used.\n\nTo get started quickly\nwith AlloyDB Omni using the default configuration, see\n[Quickstart: AlloyDB Omni](/alloydb/omni/15.5.4/docs/quickstart).\n\nBefore you begin\n----------------\n\nThe following table lists recommended hardware and software configuration for AlloyDB Omni.\n\nAlloyDB Omni runs in a container. Install a container runtime like [Docker](https://docs.docker.com/engine/install/) or [Podman](https://podman.io/docs/installation) on your machine before installing AlloyDB Omni. \n\n### Single-server\n\nMount an external data directory\n--------------------------------\n\nBy default, the command in the [Quickstart: Install AlloyDB Omni](/alloydb/omni/15.5.4/docs/quickstart) stores the database data in an area managed by Docker. This is convenient for getting started but makes it difficult to find and use the data directory. Instead, you can set up a bind mount to map the data directory to a known location on your disk. \n\n docker run --name \u003cvar translate=\"no\"\u003eCONTAINER_NAME\u003c/var\u003e \\\n -e POSTGRES_PASSWORD=\u003cvar translate=\"no\"\u003eNEW_PASSWORD\u003c/var\u003e \\\n -v \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e:/var/lib/postgresql/data \\\n -p \u003cvar translate=\"no\"\u003eHOST_PORT\u003c/var\u003e:5432 -d google/alloydbomni:15.5.4\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCONTAINER_NAME\u003c/var\u003e: The name to assign this new AlloyDB Omni container in your host machine's container registry---for example, `my-omni`.\n\n- \u003cvar translate=\"no\"\u003eNEW_PASSWORD\u003c/var\u003e: The password assigned the new container's `postgres` user after its creation.\n\n- \u003cvar translate=\"no\"\u003eDATA_DIR\u003c/var\u003e: The file system path that you want AlloyDB Omni to use for its data directory.\n\n- \u003cvar translate=\"no\"\u003eHOST_PORT\u003c/var\u003e: The TCP port on the host machine that the container should publish its own port 5432 to. To use the PostgreSQL default port on the host machine as well, specify `5432`.\n\nEnable ulimits\n--------------\n\nThe [ulimit](https://tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/x4733.html) parameters specify various process limits that the Docker container is allowed to use. For optimal performance, AlloyDB Omni adjusts process priorities to allow critical PostgreSQL processes to run with higher priority, that is they get a bigger allocation of available CPUs. To allow this, specify `-20:-20`, which removes limitations for the AlloyDB Omni container. \n\n docker run --name \u003cvar translate=\"no\"\u003eCONTAINER_NAME\u003c/var\u003e \\\n -e POSTGRES_PASSWORD=\u003cvar translate=\"no\"\u003eNEW_PASSWORD\u003c/var\u003e \\\n --ulimit=nice=-20:-20 \\\n -p \u003cvar translate=\"no\"\u003eHOST_PORT\u003c/var\u003e:5432 -d google/alloydbomni:15.5.4\n\nSpecify a logging driver\n------------------------\n\nBy default, Docker does not perform log rotations. This can use up a lot of disk space, and eventually lead to disk space exhaustion. You can configure Docker to use a different logging driver. For example, to log to journald: \n\n docker run --name \u003cvar translate=\"no\"\u003eCONTAINER_NAME\u003c/var\u003e \\\n -e POSTGRES_PASSWORD=\u003cvar translate=\"no\"\u003eNEW_PASSWORD\u003c/var\u003e \\\n --log-driver=journald \\\n -p \u003cvar translate=\"no\"\u003eHOST_PORT\u003c/var\u003e:5432 -d google/alloydbomni:15.5.4\n\nFor more information about Docker and logging drivers, refer to Docker's documentation [Configure logging drivers](https://docs.docker.com/config/containers/logging/configure/).\n\nYou can also configure logging using PostgreSQL. For more information, refer to PostgreSQL documentation [Error reporting and logging](https://www.postgresql.org/docs/15/runtime-config-logging.html).\n\nMount a shared memory volume\n----------------------------\n\nIf you plan to use the AlloyDB [columnar engine](/alloydb/omni/15.5.4/docs/columnar-engine/configure)\nwith AlloyDB Omni, we recommend making shared memory\navailable to the AlloyDB Omni container. The method for doing\nthis differs depending upon your host operating system, as shown in the\nfollowing examples. \n\n### Linux\n\nTo make shared memory available to the container, mount `/dev/shm`: \n\n docker run --name \u003cvar translate=\"no\"\u003eCONTAINER_NAME\u003c/var\u003e \\\n -e POSTGRES_PASSWORD=\u003cvar translate=\"no\"\u003eNEW_PASSWORD\u003c/var\u003e \\\n -p \u003cvar translate=\"no\"\u003eHOST_PORT\u003c/var\u003e:5432 \\\n -v /dev/shm:/dev/shm \\\n -d google/alloydbomni:15.5.4\n\n### macOS\n\nTo make shared memory available to the container, include the `--shm-size` flag: \n\n docker run --name \u003cvar translate=\"no\"\u003eCONTAINER_NAME\u003c/var\u003e \\\n -e POSTGRES_PASSWORD=\u003cvar translate=\"no\"\u003eNEW_PASSWORD\u003c/var\u003e \\\n -p \u003cvar translate=\"no\"\u003eHOST_PORT\u003c/var\u003e:5432 \\\n --shm-size=\u003cvar translate=\"no\"\u003eSHARED_MEMORY_SIZE\u003c/var\u003e \\\n -d google/alloydbomni:15.5.4\n\nReplace \u003cvar translate=\"no\"\u003eSHARED_MEMORY_SIZE\u003c/var\u003e with the size to set for `/dev/shm` on the\ncontainer, in the format described on [Running containers](https://docs.docker.com/engine/reference/run/).\nFor example, to specify one gigabyte, use the value `1g`.\n\nWe recommend setting the shared memory size to a number of megabytes equal to\nat least your database's value of [the `google_job_scheduler.max_parallel_workers_per_job`\nflag](/alloydb/docs/reference/columnar-engine-flags#max-parallel-workers-per-job), times 250. For more information\nabout the columnar engine, see [Configure the columnar engine in AlloyDB Omni](/alloydb/omni/15.5.4/docs/columnar-engine/configure).\n\nFor example, if the `google_job_scheduler.max_parallel_workers_per_job` database\nflag is set to its default value of `2`, consider adding a flag of `--shm-size=500m` or greater when starting your database server.\n\nFor more information about the `--shm-size` flag, see [Running containers](https://docs.docker.com/engine/reference/run/)."]]