Re: PostgreSQL perform poorly on VMware ESXi

From: "ktm(at)rice(dot)edu" <ktm(at)rice(dot)edu>
To: Lucas Mocellin <lucasmocellin(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: PostgreSQL perform poorly on VMware ESXi
Date: 2011-11-07 14:15:10
Message-ID: 20111107141510.GN10975@staff-mud-56-27.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Nov 07, 2011 at 08:36:10AM -0200, Lucas Mocellin wrote:
> Hi everybody,
>
> I'm having some issues with PostgreSQL 9.03 running on FreeBSD 8.2 on top
> of VMware ESXi 4.1 U1.
>
> The problem is query are taking too long, and some times one query "blocks"
> everybody else to use the DB as well.
>
> I'm a network administrator, not a DBA, so many things here can be "newbie"
> for you guys, so please be patient. :)
>
> Clonning this database to another machine not virtualized, any "crap"
> machine, it runs a way fastar, I've measured one specific "SELECT" and at
> the virtualized system (4GB RAM, 4 processors, SATA disk, virtualized), it
> took 15minutes!, in the crap machine (2GB RAM, 1 processor, SATA disk, NOT
> virtualized), it took only 2!!!
>
> I always think the bottleneck is disk I/O as I can see from the vSphere
> performance view, but the virtual machine is using exclusively the SATA
> disk with no concurrency with other machines.
>
> how do you guys deal with virtualization? any tips/recommendations? does
> that make sense the disk I/O? any other sugestion?
>
> thanks in advance!
>
> Lucas.

Hi Lucas,

Virtualization is not a magic bullet. It has many advantages but also
has disadvantages. The resources of the virtual machine are always a
subset of the host machine resources. In addition, the second layer of
disk I/O indirection through the virtual disk can effectively turn
a sequential I/O pattern into a random I/O pattern with the accompanying
10:1 decrease in I/O throughput.

I would recommend testing your I/O on your virtual machine.

Regards,
Ken

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Ivan Voras 2011-11-07 15:21:08 Re: PostgreSQL perform poorly on VMware ESXi
Previous Message Tomas Vondra 2011-11-07 10:54:02 Re: PostgreSQL perform poorly on VMware ESXi