AlloyDB Omni di-deploy melalui image Docker, yang memungkinkan berbagai bentuk penyesuaian.
Halaman ini menampilkan beberapa penyesuaian umum yang digunakan.
Untuk mulai menggunakan AlloyDB Omni dengan cepat menggunakan konfigurasi default, lihat Panduan memulai: AlloyDB Omni.
Sebelum memulai
Tabel berikut mencantumkan konfigurasi hardware dan software yang direkomendasikan untuk AlloyDB Omni.
OS/Platform
Konfigurasi hardware yang direkomendasikan
Konfigurasi software yang direkomendasikan
Linux
CPU x86-64 atau Arm (*) dengan dukungan AVX2
RAM 8 GB untuk setiap CPU yang dialokasikan ke AlloyDB Omni
Ruang disk 20+ GB
OS berbasis Debian (Ubuntu, dll.) atau RHEL 9
Kernel Linux versi 6.1 atau yang lebih baru atau kernel Linux versi apa pun yang lebih lama dari 5.3 yang memiliki dukungan untuk direktif MADV_COLLAPSE dan MADV_POPULATE_WRITE
Cgroupsv2 diaktifkan
Docker Engine 25.0.0+ atau Podman 5.0.0+
macOS
CPU Intel dengan dukungan AVX2 atau chip M
RAM 8 GB untuk setiap CPU yang dialokasikan ke AlloyDB Omni
AlloyDB Omni berjalan dalam container. Instal runtime container seperti Docker atau Podman di komputer Anda sebelum menginstal AlloyDB Omni.
Server tunggal
Memasang direktori data eksternal
Secara default, perintah di Panduan memulai: Menginstal AlloyDB Omni menyimpan data database di area yang dikelola oleh Docker. Cara ini praktis untuk memulai, tetapi menyulitkan untuk menemukan dan menggunakan direktori data. Sebagai gantinya, Anda dapat menyiapkan pemasangan bind untuk memetakan direktori data ke lokasi yang diketahui di disk Anda.
CONTAINER_NAME: Nama yang akan ditetapkan ke container AlloyDB Omni baru ini di registry container mesin host Anda—misalnya, my-omni.
NEW_PASSWORD: Sandi yang ditetapkan untuk pengguna postgres penampung baru setelah pembuatannya.
DATA_DIR: Jalur sistem file yang Anda inginkan agar AlloyDB Omni gunakan untuk direktori datanya.
HOST_PORT: Port TCP di mesin host yang harus dipublikasikan oleh container sendiri ke port 5432. Untuk menggunakan port default PostgreSQL di mesin host juga, tentukan 5432.
Mengaktifkan ulimit
Parameter ulimit menentukan berbagai batas proses yang diizinkan untuk digunakan oleh container Docker. Untuk performa optimal, AlloyDB Omni menyesuaikan prioritas proses agar proses PostgreSQL penting dapat berjalan dengan prioritas yang lebih tinggi, yaitu mendapatkan alokasi CPU yang tersedia lebih besar. Untuk mengizinkannya, tentukan -20:-20, yang akan menghapus batasan untuk penampung AlloyDB Omni.
Secara default, Docker tidak melakukan rotasi log. Tindakan ini dapat menggunakan banyak ruang disk, dan pada akhirnya menyebabkan ruang disk habis. Anda dapat mengonfigurasi Docker untuk menggunakan driver logging yang berbeda. Misalnya, untuk mencatat ke journald:
Untuk mengetahui informasi selengkapnya tentang Docker dan driver logging, lihat dokumentasi Docker Mengonfigurasi driver logging.
Anda juga dapat mengonfigurasi logging menggunakan PostgreSQL. Untuk mengetahui informasi selengkapnya, lihat dokumentasi PostgreSQL Error reporting and logging.
Memasang volume memori bersama
Jika Anda berencana menggunakan mesin berbasis kolom AlloyDB dengan AlloyDB Omni, sebaiknya sediakan memori bersama untuk penampung AlloyDB Omni. Metode untuk melakukannya
berbeda-beda, bergantung pada sistem operasi host Anda, seperti yang ditunjukkan pada
contoh berikut.
Linux
Untuk menyediakan memori bersama bagi container, pasang /dev/shm:
Ganti SHARED_MEMORY_SIZE dengan ukuran yang akan ditetapkan untuk /dev/shm di
penampung, dalam format yang dijelaskan di Menjalankan penampung.
Misalnya, untuk menentukan satu gigabyte, gunakan nilai 1g.
Misalnya, jika tanda database google_job_scheduler.max_parallel_workers_per_job
disetel ke nilai defaultnya, yaitu 2, pertimbangkan untuk menambahkan tanda --shm-size=500m atau yang lebih besar saat memulai server database Anda.
Untuk mengetahui informasi selengkapnya tentang flag --shm-size, lihat Menjalankan container.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-03 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/)."]]