Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cst7I-0005en-Nj for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2017 15:33:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cst7I-0007UI-Aq for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2017 15:33:04 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cst7H-0007Qi-9D for pgsql-hackers@postgresql.org; Tue, 28 Mar 2017 15:33:03 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cst7F-0001gy-1k for pgsql-hackers@postgresql.org; Tue, 28 Mar 2017 15:33:02 +0000 Received: from Davids-MacBook.local (unknown [208.123.164.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 37F5755671; Tue, 28 Mar 2017 15:33:00 +0000 (UTC) Subject: Re: Patch: Write Amplification Reduction Method (WARM) To: Pavan Deolasee References: <20170308193038.rl4oe27hb4u4zhx4@alvherre.pgsql> <20170321164949.GA16918@momjian.us> <20170321171727.GB16918@momjian.us> <20170321190000.GE16918@momjian.us> Cc: Robert Haas , Bruce Momjian , Amit Kapila , Alvaro Herrera , Jaime Casanova , Haribabu Kommi , Tomas Vondra , pgsql-hackers From: David Steele Message-ID: <9fcbd725-c522-c512-45ed-af6cd2ae4f71@pgmasters.net> Date: Tue, 28 Mar 2017 11:32:59 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 Pavan, On 3/28/17 11:04 AM, Robert Haas wrote: > On Mon, Mar 27, 2017 at 10:25 PM, Pavan Deolasee > wrote: >> On Tue, Mar 28, 2017 at 1:59 AM, Robert Haas wrote: >>> On Thu, Mar 23, 2017 at 2:47 PM, Pavan Deolasee >>> wrote: >>>> It's quite hard to say that until we see many more benchmarks. As author >>>> of >>>> the patch, I might have got repetitive with my benchmarks. But I've seen >>>> over 50% improvement in TPS even without chain conversion (6 indexes on >>>> a 12 >>>> column table test). >>> >>> This seems quite mystifying. What can account for such a large >>> performance difference in such a pessimal scenario? It seems to me >>> that without chain conversion, WARM can only apply to each row once >>> and therefore no sustained performance improvement should be possible >>> -- unless rows are regularly being moved to new blocks, in which case >>> those updates would "reset" the ability to again perform an update. >>> However, one would hope that most updates get done within a single >>> block, so that the row-moves-to-new-block case wouldn't happen very >>> often. >> >> I think you're confusing between update chains that stay within a block vs >> HOT/WARM chains. Even when the entire update chain stays within a block, it >> can be made up of multiple HOT/WARM chains and each of these chains offer >> ability to do one WARM update. So even without chain conversion, every >> alternate update will be a WARM update. So the gains are perpetual. > > You're right, I had overlooked that. But then I'm confused: how does > the chain conversion stuff help as much as it does? You said that you > got a 50% improvement from WARM, because we got to skip half the index > updates. But then you said with chain conversion you got an > improvement of more like 100%. However, I would think that on this > workload, chain conversion shouldn't save much. If you're sweeping > through the database constantly performing updates, the updates ought > to be a lot more frequent than the vacuums. > > No? It appears that a patch is required to address Amit's review. I have marked this as "Waiting for Author". Thanks, -- -David david@pgmasters.net -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers