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 ...