I have not experience on planning PostgreSQL on virtualized nor physical server environments so I need to get some advice how to do things correctly. We have two identical servers and we need to make the solution for virtualized PostgreSQL and App servers.
The planned architecture is that there is the master and backup servers. First Host server will be planned as App server and PostgreSQL database VM's running, but second Host server will run PostgreSQL VM (all VM's will run Centos 7). First Host server's PostgreSQL VM will send data to second Host server's VM via PostgreSQL streaming replication. Each server has 64GB RAM, 3 1TB SSD disks, and 3 2TB SATA disks for data. Also each server has hardware RAID with BBU. Initially each of the server has been intended with 2 RAID1 disks and 1 spare disk. Disk performance test
dd if=/dev/zero of=tempfile bs=1M count=8000 conv=fdatasync,notrunc
for SSD RAID 1 on Centos VM was around 340-409Mbit/s. So I have the following questions:
- what is best approach to determine the best configuration for SSD / SAS RAID? What must be taken in to account / considered?
- Both servers with RAID5. I have read that RAID5 on SSD is not bad practice anymore. Any comments on this?
- Master Server with RAID10 (last disk taken from second server) + Backup server with RAID1. How will be affected performance of the PostgreSQL master server and replication on backup server if backup server has RAID1 (slower on read /write) and Master server - RAID10?
- RAID allows setup virtual disks with various stripe sizes. Will be there any performance gain if PostgreSQL data /log disks will be located on RAID virtual disk / Xen storage with specially configured chunk size? Will be the performance gain if virtual machine partition will be set on different stripe size?