Home > Blogs > VMware vFabric Blog

Behind the Scenes: Patching PostgreSQL for Performance–vFabric Team Contributes to Open Source

After PostgreSQL 9.2 was released, users that relied on PostgreSQL for scale, may have noticed a performance hit. In fact, the PostgreSQL community alongside the VMware vFabric Postgres team, was able to prove that the new version demonstrated a 10% performance hit over version 9.1. As part of the VMware Postgres team, we wanted to fix this problem for our own distribution, but as mentioned in previous posts, we also wanted to contribute our fixes back to the common core.  This post provides additional detail on how this problem was identified and how we worked with the open source PostgreSQL community to restore performance.

Background on the Performance Issue in PostgreSQL 9.2

Last year, during routine regression testing of vFabric Postgres, we found that PostgreSQL 9.2, the latest major release of PostgreSQL, demonstrated a significant performance regression from version 9.1. Using DBT-2, an open-source and fair-use implementation of TPC-C benchmark [1], we noticed a 10% performance degradation, which we then reported to the community [2].

To troubleshoot the problem we used git bisect to find the type of commit that caused the performance problem and cross-examined the statistical profiles using oprofile. As it turns out, the regression was caused by a commit that changed the way memory was allocated when SPI queries were executed. The commit was intended to reduce the number of allocations for queries using a cached plan at the cost of more logistics work. However, according to the DBT-2 test, we could see that this tradeoff was unfavorable for dynamic queries. So to fix it, we would need reintroduce the original tradeoff on its intended queries using conditions [3].

We proposed the fix to the wider PostgreSQL community and the ensuing discussion led to a refined resolution which was implemented in a patch [4]. This patch has been back-ported to the latest PostgreSQL 9.2.3 release and is included in the latest vFabric Postgres release [5].

Performance of the PostgreSQL 9.2.3 Patch

To be sure of our results, VMware conducted a performance test of the patch [6]. The configuration details and results follow:

System Under Test (SUT)

Model: HP ML350 G6
CPU: Two quad-core Intel Xeon E5520 @ 2.27GHz, hyper-threading disabled
Memory: 12GB DDR3 @ 1333MHz
Storage: HP P410i RAID controller (256MB battery-backed cache) creating:
– One virtual drive out of one 10k-rpm SAS disk to hold OS
– One virtual drive out of one Intel 520 SSD to hold database
OS: SUSE Linux Enterprise Server 11 SP1 64-bit (kernel version

The DBT-2 traffic driver was running on a separate machine (Dell Precision 390 with dual-core Intel Core2 E6700 @ 2.66 GHz and 8GB DDR2 @ 667MHz) connected to the SUT by a GbE crossover cable.

Key postgresql.conf settings

max_connections = 100
shared_buffers = 5600MB
temp_buffers = 8193kB
work_mem = 4096kB
maintenance_work_mem = 400MB
wal_buffers = -1
checkpoint_segments = 300
logging_collector = on

Key DBT-2 and experiment settings

40 warehouses
40 db connections
zero think time
no prepared statement
shared buffer warmed up before measurement run
measurement run lasting 20 minutes
oprofile (one sample per 1 million CPU cycles) run in background

Detailed Results—Performance with the Patch

The following chart shows the performance readings (throughput, average response time, and 90th-percentile response time of all component transaction types of DBT-2) under the three concerned PostgreSQL bits (9.1.7, 9.2.2, and 9.2.2 patched). The performance regression before applying the patch is evident across all the transaction types with respect to both throughput and response time metrics; and so is the subsequent full recovery after applying the patch. 


[1] http://sourceforge.net/apps/mediawiki/osdldbt/index.php?title=Main_Page#dbt2
[2] http://archives.postgresql.org/pgsql-performance/2012-11/msg00029.php
[3] http://archives.postgresql.org/pgsql-hackers/2012-12/msg01601.php
[4] http://archives.postgresql.org/pgsql-hackers/2013-01/msg00016.php
[5] https://www.vmware.com/support/vfabric-postgres/doc/vfabric-postgres-92-release-notes.html
[6] http://archives.postgresql.org/pgsql-hackers/2013-01/msg00159.php

This entry was posted in Postgres and tagged , , on by .
Stacey Schneider

About Stacey Schneider

Stacey Schneider has over 15 years of working with technology, with a focus on working with sales and marketing automation as well as internationalization. Schneider has held roles in services, engineering, products and was the former head of marketing and community for Hyperic before it was acquired by SpringSource and VMware. She is now working as a product marketing manager across the vFabric products at VMware, including supporting Hyperic. Prior to Hyperic, Schneider held various positions at CRM software pioneer Siebel Systems, including Group Director of Technology Product Marketing, a role for which her contributions awarded her a patent. Schneider received her BS in Economics with a focus in International Business from the Pennsylvania State University.

24 thoughts on “Behind the Scenes: Patching PostgreSQL for Performance–vFabric Team Contributes to Open Source

  1. Pingback: Scaling for the Information Explosion: Master-Slave Cluster with vFabric Postgres 9.2 on vSphere | VMware vFabric Blog - VMware Blogs

  2. Pingback: How-To: Build a Geographic Database with PostGIS and vPostgres | VMware vFabric Blog - VMware Blogs

  3. Clinic Bali

    There are many things you can do to make small changes and to improve your health, and these changes can add
    up to improve your health and fitness regardless of your goals.
    Melanomas can rapidly spread beyond the confines of the local area and they
    may be really small flat, mole like, frequently
    black tumors. A massage oil Vancouver and the therapist will make use of processes to
    shape the smooth tissue on the human body to obtain these types of goals.
    It is also important to have compatibility and “ease” in a relationship.

  4. خرید سرور مجازی

    Hi I am so delighted I found your site, I really found you by mistake, while I was browsing on Yahoo for something else, Regardless I am
    here now and would just like to say thanks for a fantastic post and a all round entertaining blog (I
    also love the theme/design), I don’t have time to go through it all at the
    minute but I havge book-marked it and also added in your RSS feeds, soo when I have time I will bbe back to read more, Please do keep up
    the great b.

    Feel free tto visit my blog post: property loans

  5. دوربین مداربسته

    This entry was posted

  6. Cellogica

    Can you tell us more about this? I’d care to find out
    some additional information.

  7. Juvalux Cream

    It’s going to be finish of mine day, however before end I am reading this impressive post to increase my

  8. مهاجرت به پرتغال

    It seems great. I will test it as my next project’s database.

  9. فروش پرینتر

    it was a nice article

  10. فروش انواع چاپگرهای بعدی

    The 3D Creator, which uses Sony’s internal algorithm for 3D imaging, has four distinct scanner modes: scan head, face scan, food scan, and free scan. When a 3D scan is taken, there are a number of things that users can do. Files, each of which are about 2 megabytes, are easy to use

  11. Airplanes News

    I think the article was very good. There were very important articles that could help us give you a lot of help…

  12. چاپگر و اسکنر

    Ji kerema xwe re gotara ku her demek baş e

  13. دکتر پت


  14. تجهیزات فست فود

    what about transactions ?

  15. درمان دندان درد

    very helpful thanks

  16. ونک لیزر|درمان هموروئید ،بواسیر، شقاق ،فیستول ،کیست مویی با لیزر

    ونک لیزر|درمان هموروئید ،بواسیر، شقاق ،فیستول ،کیست مویی با لیزر

  17. https://keramatzade.com/


    کتاب صوتی

  18. https://keramatzade.com/


    کسب و کار

  19. https://keramatzade.com/


    شخص ثالث

  20. https://keramatzade.com/



  21. نمایندگی کانن

    نمایندگی کانن
    خدمات ارائه شده در نمایندگی کانن عبارتند از:

    تعمیر کانن چاپگر عمومی خدمات

    شارژ کارتریج پرینتر کانن 

    تعمیر  کارتریج پرینتر کانن

    مشکلات رول در چاپگرهای کانن

    مشکلات تغذیه کاغذ در چاپگرهای کانن

    مشکلات کاغذ در چاپگرهای کانن

    تعویض قطعات سوخته پرینتر کانن

  22. قیمت ساندویچ پانل


  23. خرید موکت از کارخانه

    thanks vmware

  24. راگا

    بسیار عالی بود
    راگا برجسته و زیبا


Leave a Reply

Your email address will not be published. Required fields are marked *