PostgreSQL performance on various distribution stock kernels - Mailing list pgsql-performance

From Damon Hart
Subject PostgreSQL performance on various distribution stock kernels
Date
Msg-id 1196117408.19996.16.camel@xw1.bbd
Whole thread Raw
Responses Re: PostgreSQL performance on various distribution stock kernels  ("Alexander Staubo" <alex@purefiction.net>)
Re: PostgreSQL performance on various distribution stock kernels  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Re: PostgreSQL performance on various distribution stock kernels  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: PostgreSQL performance on various distribution stock kernels  (Greg Smith <gsmith@gregsmith.com>)
List 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



pgsql-performance by date:

Previous
From: Pablo Alcaraz
Date:
Subject: Re: Base de Datos Transaccional
Next
From: "Alexander Staubo"
Date:
Subject: Re: PostgreSQL performance on various distribution stock kernels