Tuning performance for write

High write loads can have different patterns. For example, this can be a result of writing events to PostgreSQL or it can be a result of a bulk load from a database dump or an ETL job. You can tune PostgreSQL for high write loads by doing the following:

  • Hardware configuration:
    • You should use RAID 1+0 instead of RAID 5 or 6. RAID 10 has a much better performance for heavy writes. Also, it's better to store transaction logs (pg_xlog) on a separate hard disk.
    • You can use SSD hard disks with write-back cache (WBC), which significantly increases write performance. Also make sure your SSDs can persist cached data on power failure.
  • PostgreSQL server setting:
    • fsync: By default, fsync is on. This parameter makes ...

Get Learning PostgreSQL 11 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.