News for hackers. Stuff that matters.

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

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/Docker containers in one server? And what is the your best performance tips/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
( 4 comments | 4 points | on HN )
Re:Ask HN: Is it a good idea putting PostgreSQL inside conta... by walterbell on Monday June 01, 2015 @11:20PM (#9643635)
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.

Re:Ask HN: Is it a good idea putting PostgreSQL inside conta... by elchief on Sunday May 31, 2015 @06:28PM (#9635850)
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.

Re:Ask HN: Is it a good idea putting PostgreSQL inside conta... by tuyguntn on Monday June 01, 2015 @05:27AM (#9637487)
Because I have one server and I should utilize it as much as possible but trying to minimize performance trade-off.
Re:Ask HN: Is it a good idea putting PostgreSQL inside conta... by lstrope on Monday June 01, 2015 @11:03PM (#9643592)
Time is money. How much time are you willing to spend to make this work?

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