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

Conversation

anasanjaria
Copy link
Contributor

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/

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/
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 anasanjaria marked this pull request as ready for review March 22, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant