

Ask HN: Is it a good idea putting PostgreSQL inside container? - tuyguntn

most of the performance tips include putting PostgreSQL (or any DB) outside the application server, but is it a good idea to deploy PG inside OpenVZ&#x2F;Docker containers in one server? And what is the your best performance tips&#x2F;links for tuning PG. Most of the articles advise using XFS for PG, how does it compares to EXT4 in SSD vs XFS in SSD
======
walterbell
No containers. No virtual machines without hardware passthrough.

If you have a server where the _bios and hardware_ support VT-d/IOMMU, you can
run the database in a Xen or VMware ESX VM which has a dedicated storage
controller and optional dedicated NIC, via PCI passthrough to the VM. Probably
a good idea to dedicate some CPU cores to that VM.

------
elchief
Christ, why?

Containers are slower and less secure than bare metal. If you're using a puny
database, use SQLite.

If you're using a real database, it should be on its own computer, in its own
physical network segment, on a real OS, with no other services running.

~~~
tuyguntn
Because I have one server and I should utilize it as much as possible but
trying to minimize performance trade-off.

~~~
lstrope
Time is money. How much time are you willing to spend to make this work?

I'd spend the "time" on another dedicated box.

