Re: Postgresql in a Virtual Machine

Поиск
Список
Период
Сортировка
От Gudmundsson Martin (mg)
Тема Re: Postgresql in a Virtual Machine
Дата
Msg-id 99BA8333-EB96-4551-97AA-8FBB152693D7@volvo.com
обсуждение исходный текст
Ответ на Re: Postgresql in a Virtual Machine  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-performance
Hi!
We have virtualized several hundreds of  production databases, mostly Oracle and DB2 but a few postgres as well, and we
haveseen a very positive effect in doing this. 
We might loose a little bit in virtualization overhead but have gained a lot in flexibility and managebility.

My tips are to make sure to optimize where you have I/O and don't over provision cpu cores to VM's. Use paravirtualized
driverswhere you can and use fast storage and network to gain what you loose in virtualization overhead in those areas.


I would also make sure to check that the hypervisor does write to permanent storage before returning to the VM with
acknowledgement. 

And yes, the idea that databases and virtualization does not match, is not a reality to us anymore. It works well for
mostuse cases. 


Best regards, Martin

> 25 nov 2013 kl. 21:30 skrev "Andrew Dunstan" <andrew@dunslane.net>:
>
>
>> On 11/25/2013 03:19 PM, Heikki Linnakangas wrote:
>>> On 25.11.2013 22:01, Lee Nguyen wrote:
>>> Hi,
>>>
>>> Having attended a few PGCons, I've always heard the remark from a few
>>> presenters and attendees that Postgres shouldn't be run inside a VM. That
>>> bare metal is the only way to go.
>>>
>>> Here at work we were entertaining the idea of running our Postgres database
>>> on our VM farm alongside our application vm's.  We are planning to run a
>>> few Postgres synchronous replication nodes.
>>>
>>> Why shouldn't we run Postgres in a VM?  What are the downsides? Does anyone
>>> have any metrics or benchmarks with the latest Postgres?
>>
>> I've also heard people say that they've seen PostgreSQL to perform worse in a VM. In the performance testing that
we'vedone in VMware, though, we haven't seen any big impact. So I guess the answer is that it depends on the specific
configurationof CPU, memory, disks and the software. Synchronous replication is likely going to be the biggest
bottleneckby far, unless it's mostly read-only. I don't know if virtualization will have a measurable impact on network
latency,which is what matters for synchronous replication. 
>>
>> So, I'd suggest that you try it yourself, and see how it performs. And please report back to the list, I'd also love
tosee some numbers! 
>
>
> Yeah, and there are large numbers of public and/or private cloud-based offerings out there (from Amazon RDS, Heroku,
EnterpriseDBand VMware among others.) Pretty much all of these are VM based, and can be suitable for many workloads. 
>
> Maybe the advice is a bit out of date.
>
> cheers
>
> andrew
>
>
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance


В списке pgsql-performance по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Postgresql in a Virtual Machine
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: Postgresql in a Virtual Machine