Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 138A4B5DCEC for ; Mon, 11 Jul 2011 15:33:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 30832-07 for ; Mon, 11 Jul 2011 18:33:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm4.bullet.mail.ne1.yahoo.com (nm4.bullet.mail.ne1.yahoo.com [98.138.90.67]) by mail.postgresql.org (Postfix) with SMTP id 873FEB5DC39 for ; Mon, 11 Jul 2011 15:33:44 -0300 (ADT) Received: from [98.138.90.57] by nm4.bullet.mail.ne1.yahoo.com with NNFMP; 11 Jul 2011 18:33:43 -0000 Received: from [98.138.84.47] by tm10.bullet.mail.ne1.yahoo.com with NNFMP; 11 Jul 2011 18:33:43 -0000 Received: from [127.0.0.1] by smtp115.mail.ne1.yahoo.com with NNFMP; 11 Jul 2011 18:33:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1310409223; bh=Rp+V5QuTkeAm2xgdZqLI2ZK1VCpe36DmNPkF8ILw90U=; h=X-Yahoo-Newman-Id:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=wgzEPvJ42sz5ju82TV4MIZHnS1JIxePYe9iV/tGWHY6/WH6psGKZGIUldHa3HNYPNnZFgU68VR+FUetN9FQMj4OMVs1jpC5g2r6o50ViC+ABZclqOpNoOQQrwWov/GoRHT6+YyPSvdL1yWxBDXsvLjqA8ysIZKLOBs2RERGUrrA= X-Yahoo-Newman-Id: 626953.38023.bm@smtp115.mail.ne1.yahoo.com Received: from [192.168.206.5] (lhofhansl@67.170.234.149 with plain) by smtp115.mail.ne1.yahoo.com with SMTP; 11 Jul 2011 11:33:43 -0700 PDT X-Yahoo-SMTP: YmezqLWswBDx0ai534H100MJuqGzDQ-- X-YMail-OSG: 9zPPiM8VM1lpUhDh2L.HD6unmaTMQvNh6TckVnh63dQsgqe 7ARMGVTqlk0ajvsA1jepDS8.0_SHJz0JSuFq5GzdsU8DvZKsq1k0wYpOxo4C Nzj_4N1DVqaAzJUhQ1RzexOUFCmfMLW6M.46PnDYNJBIDE4buobfavcUq4I5 rgxSDMR_xaJtXoAFxoiLENUv0yT8rmbr7P9TSeenxb2UK.tSPZQ83DYJSYev Yoq0BVFLs9nGld9uJVZ4d_2VDMqpKr1_RdmtOGTUIYmZ778VzVoe.mNnXgYY f5.05Wg.fLtbi6VLzqTkZI6XM2WFmxPcYHWftStBHD93C4GO1E6ifrDcoAil VkhgjUZMvMSdCFAVsdbYHgQ-- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4E1B41EA.90104@yahoo.com> Date: Mon, 11 Jul 2011 11:33:14 -0700 From: lars User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Thunderbird/3.1.11 MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-performance@postgresql.org, Craig Ringer Subject: Re: UPDATEDs slowing SELECTs in a fully cached database References: <4E16479D.3050605@yahoo.com> <4E1A0CBC.6090009@yahoo.com> <4E1A31AB.9010201@postnewspapers.com.au> <1310359653.80687.YahooMailRC@web121705.mail.ne1.yahoo.com> <4E1AEDAB020000250003F1C3@gw.wicourts.gov> In-Reply-To: <4E1AEDAB020000250003F1C3@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201107/98 X-Sequence-Number: 44310 On 07/11/2011 10:33 AM, Kevin Grittner wrote: > lars hofhansl wrote: > >> Yep, I am not seeing the SELECTs slow down (measurably) during >> checkpoints (i.e. when dirty pages are flushed to disk), but only >> during writing of the WAL files. > > How about if you do a whole slew of the UPDATEs and then stop those > and run a bunch of SELECTs? (I don't think I've seen anything > mentioned so far which rules out hint bit rewrites as an issue.) > > I see you have tweaked things to balance the writes -- you might > want to try further adjustments to reduce backend writes and see > what happens. > > -Kevin Hmm... You are right. Stopping the UPDATEs, waiting for any CHECKPOINTs to finish, and then running the SELECTs indeed shows a similar slowdown. Interestingly I see very heavy WAL traffic while executing the SELECTs. (So I was confused as to what caused the WAL traffic). Why do changes to the hint bits need to be logged to the WAL? If we loose them we can always get that information back from the commit log. Maybe the backend does not know why the page is dirty and will write it to the WAL anyway(?) If that is the case there seems to be room to optimize that. -- Lars