Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 089BE2E2EED for ; Mon, 26 Nov 2007 18:50:15 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 68636-07-2 for ; Mon, 26 Nov 2007 18:50:10 -0400 (AST) Received: from cbc.xplorcapital.com (unknown [63.101.201.81]) by postgresql.org (Postfix) with ESMTP id 33C202E2EFF for ; Mon, 26 Nov 2007 18:50:10 -0400 (AST) Received: from [192.168.2.25] (xw1.bbd [192.168.2.25]) by cbc.xplorcapital.com (Postfix) with ESMTP id 982FB5A005; Mon, 26 Nov 2007 17:50:08 -0500 (EST) Subject: PostgreSQL performance on various distribution stock kernels From: Damon Hart To: pgsql-performance@postgresql.org Content-Type: text/plain Date: Mon, 26 Nov 2007 17:50:08 -0500 Message-Id: <1196117408.19996.16.camel@xw1.bbd> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/307 X-Sequence-Number: 27722 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