Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arYsN-0003d8-DA for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Apr 2016 22:39:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1arYsM-0002nl-VL for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Apr 2016 22:39:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1arYsL-0002mS-5c for pgsql-hackers@postgresql.org; Sat, 16 Apr 2016 22:39:37 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1arYsI-0007G1-1h for pgsql-hackers@postgresql.org; Sat, 16 Apr 2016 22:39:36 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E9CD520A21 for ; Sat, 16 Apr 2016 18:39:32 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 16 Apr 2016 18:39:32 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=9XVqIgVOFoQsihb2NtFmuJJ3ekI=; b=BLJjj 9QEnTr09eDNn8vEI2mD6/pD+lURnC9lyPCxxBvUvWw70uOhjtJJRyiFPAha28jXM 5eyXiPi48rI+BJaid12qCplir4l9wGT4/6uWNU0NAf4OeLyLSgzvUdQB2Jc5Kins kOnDIjKfK9VU1T00rUsoTYn7P6VQc9bLKRncUg= X-Sasl-enc: y6W7ibVDtveKvHkftELOiXmrEypPEZsQT0L0YrVz9QVK 1460846372 Received: from intern.anarazel.de (unknown [192.77.237.104]) by mail.messagingengine.com (Postfix) with ESMTPA id 8833CC0001F; Sat, 16 Apr 2016 18:39:32 -0400 (EDT) Date: Sat, 16 Apr 2016 15:39:31 -0700 From: Andres Freund To: Tom Lane Cc: Noah Misch , Kevin Grittner , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < Message-ID: <20160416223931.6biakdldeokjt77a@alap3.anarazel.de> References: <20160413192110.fogwesjti3kxycnu@alap3.anarazel.de> <20160413200148.bawmwjdmggbllhha@alap3.anarazel.de> <20160416204452.GA1910190@tornado.leadboat.com> <20160416205630.puxsglckxi3sn5ec@alap3.anarazel.de> <23903.1460843564@sss.pgh.pa.us> <20160416220439.56ga5ghy4zgt356h@alap3.anarazel.de> <5870.1460845626@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5870.1460845626@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Hi, On 2016-04-16 18:27:06 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2016-04-16 17:52:44 -0400, Tom Lane wrote: > >> That's more than a 5X penalty, which seems like it would make the > >> feature unusable; unless there is an argument that that's an extreme > >> case that wouldn't be representative of most real-world usage. > >> Which there may well be; I've not been following this thread carefully. > > > The 4 % was with the feature disabled (in comparison to before it's > > introduction), we're not sure where that's coming from. But the 5x - and > > that was just on a mid-sized box - is with the feature enabled. > > 128 processors is a mid-sized box? It has fewer. > Or if you didn't have 128 processors, why are you testing "-c 128 -j > 128" cases? I tried 128, because it's a random number I picket out of my hat. I've posted various different client numbers elsewhere in the thread. The machine (a VM, this isn't the best test!), has 20 cores / 40 hw threads afaik. But 128 connections on 40 "cpus" isn't unrealistic. Many workloads have a lot more connections and concurrent queries than cores - besides often being operationally easier, it's also sensible from a hardware utilization perspective. Due to latency effects individual connections frequently are idle; even if the client were issuing queries as fast as possible. > More seriously, the complaints here seem to center on performance in a > read-only workload; but I don't actually see why you'd want to turn on > this feature in a read-only, or even read-mostly, workload. In a purely read-only workload it's surely pointless. But I don't see why the results would be any benefit in a 75 read/25 write mix; which is probably already more write heavy than a lot of the actual workloads out there. > It exists for > the benefit of people who are trying to keep their pg_xlog/ directories > reasonably sized, no? That doesn't sound very read-only-ish to me. pg_xlog size? By my understanding it's there to cope with the bloat introduced by longrunning readonly transactions? Isn't the idea that "old snapshots" basically don't enforce their xmin anymore, allowing vacuum/hot pruning? Such old snapshots continue to work as long as they're not used to make visibility decisions about pages which have been modified "recently". The whole feature only is interesting if such old snapshots are likely to only access data that's not frequently modified. - Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers