Re: Postgresql in a Virtual Machine

From: Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
To: Lee Nguyen <leemobile(at)gmail(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Postgresql in a Virtual Machine
Date: 2013-11-26 09:47:35
Message-ID: 52946E37.1050001@usit.uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/25/2013 09:01 PM, 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.
>
[........]

Hello

This was true some years ago. In our experience, this is not true
anymore if you are not running a very demanding system that will be a
challenge even running on metal. It should work well for most use
cases if your infrastructure is configured correctly.

This year we have moved all our postgreSQL servers (45+) to a VMware
cluster running vSphere 5.1. We are also almost finished moving all
our oracle databases to this cluster too. More than 100 virtual
servers and some thousands databases are running without problems in
our VM environment.

In our experience, VMware vSphere 5.1 makes a huge different in IO
performance compared to older versions. Our tests against a storage
solution connected to vm servers and metal servers last year, did not
show any particular difference in performance between them. Some tips:

* We use a SAN via Fibre Channel to storage our data. Be sure to have
enough active FC channels for your load. Do not even think to use NFS
to connect your physical nodes to your SAN.

* We are using 10GigE to interconnect the physical nodes in our
cluster. This helps a lot when moving VM servers between nodes.

* Don't use in production the snapshot functionality in VM clusters.

* Don't over provision resources, specially memory.

* Use paravirtualized drivers.

* As usual, your storage solution will define the limits in
performance of your VM cluster.

We have gained a lot in flexibility and manageability without losing
performance, the benefits in these areas are many when you
administrate many servers/databases.

regards,
- --
Rafael Martinez Guerrero
Center for Information Technology
University of Oslo, Norway

PGP Public Key: http://folk.uio.no/rafael/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEARECAAYFAlKUbjcACgkQBhuKQurGihTpHQCeIDkjR/BFM61V2ft72BYd2SBr
sowAnRrscNmByay3KL9iicpGUYcb2hv6
=Qvey
-----END PGP SIGNATURE-----

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Boszormenyi Zoltan 2013-11-26 13:51:59 Re: Postgresql in a Virtual Machine
Previous Message Xenofon Papadopoulos 2013-11-26 06:30:31 Re: Postgresql in a Virtual Machine