Skip to content

Comments

Use separate disks for WAL and data#984

Open
anasanjaria wants to merge 2 commits intozalando:masterfrom
anasanjaria:add_separate_wal_directory
Open

Use separate disks for WAL and data#984
anasanjaria wants to merge 2 commits intozalando:masterfrom
anasanjaria:add_separate_wal_directory

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/

@anasanjaria anasanjaria force-pushed the add_separate_wal_directory branch from 90800a8 to 14fc3fc Compare March 22, 2024 16:53
@anasanjaria anasanjaria marked this pull request as ready for review March 22, 2024 16:54
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 force-pushed the add_separate_wal_directory branch from 14fc3fc to 7912f83 Compare August 31, 2024 10:25
@anasanjaria
Copy link
Contributor Author

@hughcapet Could someone please review my PR as it's opened for a very long time?

@vyalamar
Copy link

This is a great feature? Can we give this a shot and take it from here?

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.

2 participants