Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCEDM-0003zi-Ei for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jul 2015 21:46:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZCEDL-0007bO-UR for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jul 2015 21:46:11 +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) (envelope-from ) id 1ZCECB-0006L5-5w for pgsql-bugs@postgresql.org; Mon, 06 Jul 2015 21:44:59 +0000 Received: from smtp5-g21.free.fr ([212.27.42.5]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZCEC8-00015Z-Tb for pgsql-bugs@postgresql.org; Mon, 06 Jul 2015 21:44:57 +0000 Received: from zimbra72-e12.priv.proxad.net (unknown [172.20.243.222]) by smtp5-g21.free.fr (Postfix) with ESMTP id D2FB2D48069; Mon, 6 Jul 2015 23:44:54 +0200 (CEST) Date: Mon, 6 Jul 2015 23:44:54 +0200 (CEST) From: olivier.gosseaume@free.fr To: Andres Freund Cc: pgsql-bugs@postgresql.org Message-ID: <750970196.17190175.1436219094798.JavaMail.root@zimbra72-e12.priv.proxad.net> In-Reply-To: <20150706210527.GE340@alap3.anarazel.de> Subject: Re: BUG #13484: Performance problem with logical decoding MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [82.225.179.15] X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - FF3.0 (Win)/7.2.0-GA2598) X-Authenticated-User: olivier.gosseaume@free.fr X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org >> >Are you stopping pg_recvlogical between the runs, or are you letting it >> >run? The point of using it is that it's a streaming, i.e. that you do >> >not need to pay to "startup" costs of logical decoding, which can be >> >noticeable. >> >> No, I just let it run. In my case the bottleneck seems to be on server >> side when spilling to disk. I can see the server build the files but >> very slowly. > >That's odd. It's really just a plain series of writes. I wonder if for >some reason windows disables write buffering or such? > >Ugh, I have a theory. I guess you can't easily recompile postgres with a >patch and test again? I don't have access to windows... Thanks for your finding. I can try to recompile on Windows (will look how). In fact I did a test with a tool called "API Monitor" which displays all Windows API calls during postgres execution. What I see is : - approx 8000 writes - for each individual write I see a call to FlushFileBuffers() which is very bad for performance, so it is a Windows only issue >Any chance you could cross check on a unixoid OS? Just to rule out it's >not some configuration/setup/? issue? I can try in a virtualbox, but I would prefer to test your patch before if possible br Olivier -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs