X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5EFB29FA5BE for ; Tue, 13 Jun 2006 09:03:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 67535-04 for ; Tue, 13 Jun 2006 09:03:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.aeccom.com (port-83-236-156-26.static.qsc.de [83.236.156.26]) by postgresql.org (Postfix) with ESMTP id 1D0999FA12F for ; Tue, 13 Jun 2006 09:03:26 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.aeccom.com (Postfix) with ESMTP id 6EF731D030; Tue, 13 Jun 2006 14:03:23 +0200 (CEST) Received: from mail.aeccom.com ([127.0.0.1]) by localhost (gate6.aeccom.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31780-01; Tue, 13 Jun 2006 14:03:22 +0200 (CEST) Received: from [192.168.2.14] (andes.core.aeccom.com [192.168.2.14]) by mail.aeccom.com (Postfix) with ESMTP id 56F3D1D02D; Tue, 13 Jun 2006 14:03:22 +0200 (CEST) Message-ID: <448EA989.5000408@aeccom.com> Date: Tue, 13 Jun 2006 14:03:21 +0200 From: Sven Geisler Organization: AEC/communications GmbH User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Luke Lonergan CC: "Pgsql-Performance ((E-mail))" Subject: Re: 64-bit vs 32-bit performance ... backwards? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at aeccom.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/177 X-Sequence-Number: 19534 Luke Luke Lonergan schrieb: > On 6/13/06 2:04 AM, "Sven Geisler" wrote: >> Please find attached a small patch with does apply a change to the >> x86_64 part also to the i386 part of src/include/storage/s_lock.h. >> Without this change the performance of PostgreSQL 8.0 was horrible on a >> Opteron. The effect is smaller with PostgreSQL 8.1. > > Can you describe what kinds of tests you ran to check your speed? I has create a test scenario with parallel client which running mostly SELECTs on the same tables. I used a sequence of 25 queries using 10 tables. We use the total throughput (queries per second) as result. > > Since it's the TAS lock that you are patching, the potential impact is > diffuse and large: xlog.c, shmem.c, lwlock.c, proc.c, all do significant > work. Yes, I know. We had a problem last year with the performance of the Opteron. We have started the futex patch to resolve the issue. The futex patch itself did have no effect, but there was a side effect because the futex patch did use also another assembler sequence. This make a hole difference on a Opteron. It turned out that removing the lines cmpb jne lock was the reason why the Opteron runs faster. I have created a sequence of larger query with following result on Opteron 875 and PostgreSQL 8.0.3 orignal 8.0.3 => 289 query/time and 10% cpu usage patched 8.0.3 => 1022 query/time and 45% cpu usage I has a smaller effect on a XEON MP with EM64T. But this effect wasn't that huge. There was no effect on classic XEON's. Cheers Sven.