PostgreSQL performance on various distribution stock kernels

From: Damon Hart <dhcom(at)sundial(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: PostgreSQL performance on various distribution stock kernels
Date: 2007-11-26 22:50:08
Message-ID: 1196117408.19996.16.camel@xw1.bbd
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Is there a source comparing PostgreSQL performance (say, using
pgbench) out of the box for various Linux distributions? Alternately,
is there an analysis anywhere of the potential gains from building a
custom kernel and just what customizations are most relevant to a
PostgreSQL server?

Some background - in investigating the overhead of adopting OpenVZ
virtualization, I ran pgbench tests on PostgreSQL running in a virtual
environment (VE) and compared to PostgreSQL running directly on the
hardware node (HN) under the current stable OpenVZ kernel with no VE
running. The results were roughly in line with expectations based on
OpenVZ documentation (5% fewer transactions per second.)

For completeness, I then ran the same tests with the current stock
Fedora 8 kernel running natively on the same hardware (after all this
is the true non-virtual alternative.) Surprisingly, this test
performed markedly worse than under the OpenVZ kernel (either on HN or
in VE) even though the latter is from the 2.6.18 series and has added
baggage to support OpenVZ's OS virtualization. Multiple pgbench runs
arrive confirm this conclusion.

The PostgreSQL server version (8.2.5), configuration, hardware,
etc. are identical (actually same HD filesystem image mounted at
/var/lib/pgsql) for each test. Similarly, other than the kernel, the
OS is identical - stock Fedora 8 with up to date packages for each
test.

I double-checked the kernel architecture via uname:

Fedora 8:
Linux 2.6.23.1-49.fc8 #1 SMP Thu Nov 8 21:41:26 EST 2007 i686 i686 i386
GNU/Linux

OpenVZ:
Linux 2.6.18-8.1.15.el5.028stab049.1 #1 SMP Thu Nov 8 16:23:12 MSK 2007
i686 i686 i386 GNU/Linux

So, what's different between these tests? I'm seeing performance
differences of between +65% to +90% transactions per second of the
OpenVZ kernel running on the HN over the stock Fedora 8 kernel. Is
this reflective of different emphasis between RHEL and Fedora kernel
builds? Some OpenVZ optimization on top of the RHEL5 build? Something
else? Where should I look?

any insights much appreciated,

Damon Hart

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alexander Staubo 2007-11-26 23:00:20 Re: PostgreSQL performance on various distribution stock kernels
Previous Message Pablo Alcaraz 2007-11-26 20:53:42 Re: Base de Datos Transaccional