CYBERTEC PostgreSQL Logo

PostgreSQL virtualization revisited

03.2013 / Category: / Tags:

Virtualization has been one of the pre-dominant topics in the past couple of years. Not going to the cloud is considered to be uncool - at minimum it feels like being stake in the stone age of computing.

Going to the cloud / virtualization?

First of all it means "virtualization". If you google it you can find many definitions. A suitable definition is: Virtualization is the process of creating a virtual (rather than actual) version of something, such as a virtual server, virtual storage device, virtual network, or even a virtual operating system. In the context of computing, virtualization refers to the creation of a virtual (rather than physical) version of a computing resource, such as a server, storage device, network, or operating system. Virtualization allows multiple virtual instances of resources to run on a single physical machine, enabling better resource utilization, improved scalability, flexibility, and cost savings.
This is cool from many points of view but what does it mean for performance? Virtualization usually does not good, this was clear from the start.

The impact of virtualization

The impact can actually be quite shocking as the following profiling output of a PostgreSQL instance shows (we used XEN for virtualization):

What you can see is that basically half of the time is spent is burned by virtualization - not PostgreSQL. Similar results can be observed when comparing virtualized results with non-virtualized ones. On an 8-core AMD box PostgreSQL managed to provide us with 4.500 TPS (pgbench scale factor 10 with 10 concurrent users). Doing the same thing inside a KVM virtual machine made PostgreSQL achieve something in the area of 1.600 TPS.

It is especially important to mention that PostgreSQL was running with "synchronous_commit = off" to reduce fsync-related contentions.

Finally...

For small scale applications virtualization is definitely an advantage because more stuff can be put on the same hardware. For large scale PostgreSQL databases, however, it might turn out to be a foot gun.

In order to receive regular updates on important changes in PostgreSQL, subscribe to our newsletter, or follow us on Facebook or LinkedIn.

Comments are closed.

CYBERTEC Logo white
CYBERTEC PostgreSQL International GmbH
Römerstraße 19
2752 Wöllersdorf
Austria

+43 (0) 2622 93022-0
office@cybertec.at

Get the newest PostgreSQL Info & Tools


    This site is protected by reCAPTCHA and the Google Privacy Policy & Terms of Service apply.

    ©
    2024
    CYBERTEC PostgreSQL International GmbH
    phone-handsetmagnifiercrosscross-circle
    linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram