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 1irYj3-0000jP-RY for pgsql-performance@arkaria.postgresql.org; Wed, 15 Jan 2020 02:48:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1irYj2-000285-J4 for pgsql-performance@arkaria.postgresql.org; Wed, 15 Jan 2020 02:48:08 +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 1irYj2-00027y-99 for pgsql-performance@lists.postgresql.org; Wed, 15 Jan 2020 02:48:08 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1irYj0-0003rc-5i for pgsql-performance@postgresql.org; Wed, 15 Jan 2020 02:48:07 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D70772220C; Tue, 14 Jan 2020 21:48:04 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 14 Jan 2020 21:48:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=gaeC4dgimSQK02znqUtyA5Zamuf Mwxrz8AhFrv1gvvg=; b=HNOrf3s34l1uuH7qCCdl3Q/OTh8ywypDc+lA+m/oeNl yke48C+cwrYIJVSzRSuvBfLPxmjyjFAJn7gaspgYbN3Cy2m6hZ0Mmn8Jeo9LNx4s 6wpMs/iiu+ZFDdnuMw1HfIfCkYHX5yv1kKoRmVavcD/XXBWidSV3iiTAebntj9Uf NXoJwtLo05R/faZXr3NMS2QZKuR9wGsdFlzy22KBFWRkvkDBouEgwRMzKh/sTzP4 NaxkkpcAmDyf2b9es8v1ilXFEjh4KiIdNZf6gdY4MdkUV7m5w+glE0iJwwzZCTds tTeHG/mC/0t+5qYtkne44cPaOhocj0vcXilorlRLvtw== 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=gaeC4d gimSQK02znqUtyA5ZamufMwxrz8AhFrv1gvvg=; b=U+Pe8623BUh6oKnVZ0fUP0 85QPr0C1lgoiRvdAEsht60Q2ympIy8WIsxR9nblD1lnykiMQNork3srFlriTFbyZ bW+LyrXkrjsJEWdz0LmVyTQYdEW0Bp/DaB59NGIfrs9EKfqAhkk3DxBJJsMGLsxz xcyI7uKjsF0Q0LMj5rRbx+uDEuuwdfDJ8ZfpL4gPuNDVJxKh3YU7Tx3M/1/ufKsK vZRNrEer+aIhCXHtdWOUAlonxwWhc/FywSb9CyjnlcJhasmVZfjiMcJXnv1pnjz7 /JSsF0E6dZOR654DdDk5PPqGdWjE/w0DmzsghXNWyapE7IFKcZmrZr4NSAeL54PQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrtddvgdehtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhepfffhvf fukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhi vghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecukfhppeduuddurddutd dvrddukedtrddukeehnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehp rghquhhivghrrdighiiinecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id B52EE30602DE; Tue, 14 Jan 2020 21:48:03 -0500 (EST) Date: Wed, 15 Jan 2020 11:48:00 +0900 From: Michael Paquier To: Joao Junior Cc: pgsql-performance@postgresql.org Subject: Re: shared buffers and startup process Message-ID: <20200115024800.GD2243@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="l06SQqiZYCi8rTKz" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --l06SQqiZYCi8rTKz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jan 14, 2020 at 04:29:51PM +0100, Joao Junior wrote: > I would like to know if increasing the amount of shared-buffers could help > the startup process applying the wals. I would like to know if in > the process of reading the wals and applying them, blocks that should be > written will be brought to shared buffer or not?? Please feel free to look at XLogReadBufferForRedo() in xlogutils.c and check what the routine does, and when/where it gets called. The code is well-documented, so you will find your answer easily. > If yes, having a bigger > shared buffer will keep as much as possible the amount of pages there and > increase the startup process's speed avoiding pages's replacement and going > to the OS cache and maybe to the disk . > Does it make sense? It does. Even if relying on the OS cache would be enough in most cases, it is good to keep a certain of pages hot enough, and you need to be careful with not setting shared_buffers too high either. -- Michael --l06SQqiZYCi8rTKz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4efWAACgkQnvQgOdby QH0Amw/+K9Br3nEU8meDulpdeX2jJeaLNo4qrS7PriBYAKfeje9Mh//nf6mdkSUl Xlhou93xICv3roGMwuhG9gMSIZ0qVsgYDvf+PwAg+5NXp8PC3ID/nk5NMXQwuyzo fDqHJ48ySjFgbqMgt+I6ZcspTv0TcOgbPhXXFdUF2jg2h7x93Sl4MXx961AgtyDh mZwmUW2lWQ2kn+wnMrgFBK8qD1m4hPpAsD0mm1D38mxnwUiy+CwAroCFSSBpocIc hgoGxQ3os51D5s+KiMpIATa+KdgtpxDU87nQuvjPGTGMeMWLBIIuga8gGkNfqJTq VU1e6882Fox6GZa5f3CvJteY+Z3g5yMx34nExvyxCZY0RzqzNUmjJcQUx4GatC0p LjDQCvUT5yc+pbMlXHuLJfBHfoUiZDd01Hn3F+Yw+qXf22b3maQWN+YbRiWMFkkP ATl1/qcL+K2oJ0eoBsw1xw/pWtlT+MRrBd0hwkwOVXF6M8OoOly/ZjIA0DH5NKLk P/rimu9F934zIOoTPudDaU7m/czxNltE/gCHW1rtLIFtuxk1GUrkPtjjSuty0qLB +sdBhzOdZaa5oG6qlEuoSXnlMyguCtjRawSLAXfeiv4KPxUqkCJjEtqGaNcH+9pk 5RsvlJ1qTyYpRy6EM9kUc1FwYHsC7cE+dDRp3d6hv61nlPnri1o= =tfBc -----END PGP SIGNATURE----- --l06SQqiZYCi8rTKz--