Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elHkV-00071b-SB for pgsql-general@arkaria.postgresql.org; Mon, 12 Feb 2018 17:18:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elHkU-0004LK-Iu for pgsql-general@arkaria.postgresql.org; Mon, 12 Feb 2018 17:18:38 +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 1elHkU-0004LB-7v for pgsql-general@lists.postgresql.org; Mon, 12 Feb 2018 17:18:38 +0000 Received: from mail.wordtothewise.com ([184.105.179.154]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1elHkN-0002nM-Jl for pgsql-general@lists.postgresql.org; Mon, 12 Feb 2018 17:18:37 +0000 Received: from satsuke.wordtothewise.com (204.11.227.194.static.etheric.net [204.11.227.194]) by mail.wordtothewise.com (Postfix) with ESMTPSA id 92A1A23379 for ; Mon, 12 Feb 2018 09:19:18 -0800 (PST) From: Steve Atkins Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: persistent read cache Date: Mon, 12 Feb 2018 09:18:29 -0800 References: To: pgsql-general@lists.postgresql.org In-Reply-To: Message-Id: <874AB6F0-B9D4-4558-AECD-58C9CE5E63B8@blighty.com> X-Mailer: Apple Mail (2.3273) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Feb 11, 2018, at 5:14 PM, Sand Stone wrote: > > > Hi. I wonder if there is such a thing or extension in the PG world. > > Here is my use case. I am using PG (PG10 to be more specific) in a > cloud VM environment. The tables are stored in RAID0 managed SSD > backed attached storage. Depending on the VM I am using, I usually > have 256GB local SSD unused. > > I wonder if PG could leverage this local SSD as a read (page/block) > cache, to complement/extend the DRAM by used by shared_buffer today. It seems something that PostgreSQL could take advantage of, but it's probably the wrong layer to implement it. If your VM infrastructure doesn't have any way to use it directly, maybe you could do it at the drive / filesystem level with something like bcache, lvmcache or enhanceio? Adding that sort of complexity to something that needs solid data integrity makes me nervous, but those solutions have been in the field for years. Cheers, Steve