Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use separate disks for WAL and data #984

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 31, 2024

  1. Use separate disks for WAL and data

    One of the performance optimization technique for insertion according
    to Timescaledb blog is to use separate disks for WAL & data.
    
    According to blog [1],
    ```
    Use separate disks for WAL and data
    -----------------------------------
    While this is a more advanced optimization that isn't always needed, if your disk becomes a bottleneck,
    you can further increase throughput by using a separate disk (tablespace) for the database's write-ahead log (WAL) and data.
    ```
    
    [1] https://www.timescale.com/blog/13-tips-to-improve-postgresql-insert-performance/
    anasanjaria committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    3364eb1 View commit details
    Browse the repository at this point in the history
  2. Adjust wal fast source logic to explicitly connsider data directory

    Simplified logic of wal_fast can be found here [1] which is as follows:
    ```
    WAL_FAST=$(dirname "$DATA_DIR")/wal_fast
    ```
    Hence, aligning with the same logic to keep things simple. This way, it will not conflict
    with separate WAL directory too.
    
    [1] https://github.com/anasanjaria/spilo/blob/master/postgres-appliance/scripts/basebackup.sh
    anasanjaria committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    7912f83 View commit details
    Browse the repository at this point in the history