Re: PostgreSQL and OpenVZ

From: Frank Finner <postgresql(at)finner(dot)de>
To: iz(at)sai(dot)msu(dot)ru
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL and OpenVZ
Date: 2006-06-30 18:28:23
Message-ID: 20060630202823.1f61c7c1.postgresql@finner.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I use this approach both for development and backup servers (with PITR). Everything runs very smoothly. You should, of course, keep an eye on /proc/user_beancounters and diskquota to ensure that the engines have enough shared memory, network io (both sockets and buffer, tcp and "other") and disk space. Stock values are too low.

That__s not a real problem, though, because you can adjust all the values while running the server, but be careful to adjust shared memory before going in production, otherwise you might have to restart the database engine.

For production I use several medium loaded OpenVZ machines with apache webservers, but one dedicated physical machine for the database engine, keeping one database for each webserver. I did not use one database engine per server, because I think, that it is more effective to use all its physical memory for one engine instead of dividing it into parts for several engines. This is an unproven theory of mine, I did not have enough time to evaluate it.

In principle I found no problems other than giving the OpenVZ server enough ressources. Though I did not do any speed comparisons "native" vs. "OpenVZ", I could do some benchmarking next week, if you need some values.

For the PITR OpenVZ PostgreSQL backup server I even copy the WALs etc. using the base system into /vz/private/... while the OpenVZ database server is down. As soon as I fire up the OpenVZ database server, it uses the copied stuff while starting up. Because the OpenVZ server starts with the same IP like the main database server, there is no need to change anything else while switching from main server to backup server.

Regards, Frank.

On Fri, 30 Jun 2006 18:37:27 +0400 "Ivan Zolotukhin" <ivan(dot)zolotukhin(at)gmail(dot)com> thought long, then sat down and wrote:

> Hello,
>
> Does anybody have experience in running PostgreSQL inside OpenVZ
> (http://openvz.org/) or any other virtual private servers solutions?
> I'm interested in both cases of running single PostgreSQL server and
> multiple PostgreSQLs on one physical machine under relatively high
> (though not IO-limited) load.
>
> Any caveats or limitations of this approach? Any known penalties or
> problems with this tandem?
>
> Best regards,
> Ivan Zolotukhin
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
Frank Finner

Invenius - Lösungen mit Linux
Köpfchenstraße 36
57072 Siegen
Telefon: 0271 231 8606 Mail: frank(dot)finner(at)invenius(dot)de
Telefax: 0271 231 8608 Web: http://www.invenius.de
Key fingerprint = 90DF FF40 582E 6D6B BADF 6E6A A74E 67E4 E788 2651

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-06-30 18:39:40 Re: Notes on converting from MySQL 5.0.x to PostgreSQL
Previous Message snacktime 2006-06-30 18:27:48 Re: User privileges in web database applications