Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gm3BK-0000Oa-2W for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jan 2019 21:02:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gm3BI-0002vF-LC for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jan 2019 21:02:00 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gm3BH-0002v8-Mq for pgsql-hackers@lists.postgresql.org; Tue, 22 Jan 2019 21:02:00 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gm3BF-00009n-HY for pgsql-hackers@postgresql.org; Tue, 22 Jan 2019 21:01:59 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id C39BA13ED; Tue, 22 Jan 2019 16:01:54 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 22 Jan 2019 16:01:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=ag41C0w6R+YA8WFX1PUU167jAg+ 1xn9rJIW7OArsT8A=; b=bY6DIhYl22Ggb9PgQVfsr/ylMLAaBuEd0eimFHW/wj+ 2PVQrE7VLjpzKXOhLC1loog1kynozm/0+jBohz0u0ITBP1zXY0DaHB+/E6Luzwzd rUshrIzqg1nvlz7TW6Dns7AR2qGY251u6hTSe0jStGh/0ZVBqlv3W2auzMMWWzMO mlYyXmfwyiJWiiU0uSzOudhKD9p6/qNnPWa0JZRii2WVuKuFgIBqhWebyImECwC9 ciJewEM79HwfeB+G98rFdFQGbIp5SbMYw6qCuOKAz2yFQftJuW4HPti4uNMl5S4i SXILa9HPPLjlc4Vke0arLSAp3jyF7M2u2jL0jOn1kWw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=ag41C0 w6R+YA8WFX1PUU167jAg+1xn9rJIW7OArsT8A=; b=inBCOukAZlnw1K7uU0HHvZ OioaD6JN1MdrgB+JqvdRIgJA7b1LXripjn1fIfZoHsWRZy00xS0SnOuY4Xg7Y+6P DfjQpEVODvCgQ1afGdhP7YffBCi6BuXDT1/vTC8JRY0eEjtCDktbk1vE2bnVbeXb y4aSWcrnGtj+9ONUWgMoCdiFpCrkiVlYgEYqcwygQNmctXRW8qpjI2+7phCXLStn acpVEhR/BTN/yJTOvvxnMkZIVRaIeudlFKV7Xf/gQwmAoHurMdgJMHFURuob3NZk ZTmVV2fsIiVtle0wf3lDKdKuO5WNKFt0DjZ4JhhkVyZ9hwbGrECGPQYyj8rWXibQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrheekgddugeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvuffkfh ggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghsucfhrhgvuhhnugcuoegr nhgurhgvshesrghnrghrrgiivghlrdguvgeqnecukfhppeelkedrvddutddrudegtddrud ejudenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdr uggvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id A60C61027C; Tue, 22 Jan 2019 16:01:53 -0500 (EST) Date: Tue, 22 Jan 2019 13:01:52 -0800 From: Andres Freund To: Kevin Grittner Cc: Thomas Munro , Dmitry Dolgov <9erthalion6@gmail.com>, Robert Haas , PostgreSQL-development , Shawn Debnath Subject: Re: Refactoring the checkpointer's fsync request queue Message-ID: <20190122210152.gfeak6basvbvfkon@alap3.anarazel.de> References: <20190122181702.jueacsyffjwla3bb@alap3.anarazel.de> <20190122203832.hckrvue3q5s75luv@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-01-22 14:53:11 -0600, Kevin Grittner wrote: > On Tue, Jan 22, 2019 at 2:38 PM Andres Freund wrote: > > > close() doesn't trigger an fsync() in general > > What sort of a performance hit was observed when testing the addition > of fsync or fdatasync before any PostgreSQL close() of a writable > file, or have we not yet checked that? I briefly played with it, and it was so atrocious (as in, less than something like 0.2x the throughput) that I didn't continue far down that path. Two ways I IIRC (and it's really just memory) I tried were: a) Short lived connections that do a bunch of writes to files each. That turns each disconnect into an fsync of most files. b) Workload with > max_files_per_process files (IIRC I just used a bunch of larger tables with a few indexes each) in a read/write workload that's a bit larger than shared buffers. That lead to most file closes being integrity writes, with obvious downsides. Greetings, Andres Freund