Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id BB0C1632D0E for ; Thu, 19 Mar 2009 17:49:53 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 36217-04 for ; Thu, 19 Mar 2009 17:49:47 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mail.postgresql.org (Postfix) with ESMTP id B4DA9632A90 for ; Thu, 19 Mar 2009 17:49:51 -0300 (ADT) Received: by yx-out-2324.google.com with SMTP id 8so475935yxm.73 for ; Thu, 19 Mar 2009 13:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=hHHFbsyR2MRzlrYJxguusk2oM4xHBoiJF+2PABSJLWw=; b=Wq94KS4ye8C4I2AEzgoKbjJYH+cGMQezv6yYvfBhs4fCwJMdh4EcOkFP8IiTfPasmE WykeL9lcB7yEfuiULYap4AzlFb3IlqscLvblpdJzRNFaRRuiftoNItmJMTPcmA9+RnB2 qwUvr8S6ACNOyUFVN4DgO7mVGk6a+wfD2YcHc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=f2PjRAtvyZeMf0OOS4DIr8/K8XmAtQK1XRa6A9tgvBy8nf8Qhl8AxPJnAHiiTTIcP6 L0ibwn4nk61YqTMAUuJ+Qo2++mV4JAgNJnMQet8rK3jFKuR7nhr/naRaPXHIwEGLis4A YizaB6KlRPV4qQ9sKehZn4ihdv9wJyjhz/xmI= MIME-Version: 1.0 Received: by 10.100.41.9 with SMTP id o9mr3103598ano.49.1237495790190; Thu, 19 Mar 2009 13:49:50 -0700 (PDT) In-Reply-To: <49C17190.9050003@sun.com> References: <603c8f070903121829r31cf1472ha9876e5c480a542e@mail.gmail.com> <603c8f070903181425r6fff6f7eq11e2dac6e867a7d0@mail.gmail.com> <49C17190.9050003@sun.com> Date: Thu, 19 Mar 2009 16:49:49 -0400 Message-ID: <603c8f070903191349p5e8fb00as2816581d584fcefd@mail.gmail.com> Subject: Re: Proposal of tunable fix for scalability of 8.4 From: Robert Haas To: "Jignesh K. Shah" Cc: Scott Carey , Greg Smith , Kevin Grittner , "pgsql-performance@postgresql.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/271 X-Sequence-Number: 33193 > Actually the patch I submitted shows no overhead from what I have seen an= d I > think it is useful depending on workloads where it can be turned on=A0 ev= en on > production. Well, unless I'm misunderstanding something, waking all waiters every time could lead to arbitrarily long delays for writers on mostly read-only workloads... and by arbitrarily along, we mean to say "potentially just about forever". That doesn't sound safe for production to me. > I dont think anything is majorly wrong in my system.. Sometimes it is > PostgreSQL locks in play and sometimes it can be OS/system related locks = in > play (network, IO, file system, etc).=A0 Right now in my patch after I fi= x > waiting procarray=A0 problem other PostgreSQL locks comes into play: > CLogControlLock, WALInsertLock , etc.=A0 Right now out of the box we have= no > means of tweaking something in production if you do land in that problem. > With the patch there is means of doing knob control to tweak the bottlene= cks > of Locks for the main workload for which it is put in production. I'll reiterate my previous objection: I think your approach is too simplistic. I think Tom said it the best: a lot of work has gone into making the locking mechanism lightweight and safe. I'm pretty doubtful that you're going to find a change that is still safe, but performs much better. The discussions by Heikki, Simon, and others about changing the way locks are used or inventing new kinds of locks seem much more promising to me. > Right now.. the standard answer applies.. nope you are running the wrong > workload for PostgreSQL, use a connection pooler or your own application > logic. Or maybe.. you have too many users for PostgreSQL use some > proprietary database. Well I certainly agree that we need to get away from that mentality, although there's nothing particularly evil about a connection pooler... it might not be suitable for every workload, but you haven't specified why one couldn't or shouldn't be used in the situation you're trying to simulate here. ...Robert