Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id BB53A2E01E7 for ; Fri, 15 Feb 2008 10:03:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 70461-01-3 for ; Fri, 15 Feb 2008 10:03:41 -0400 (AST) Received: from hyperion.scode.org (hyperion.scode.org [85.17.42.115]) by postgresql.org (Postfix) with ESMTP id 069042E0254 for ; Fri, 15 Feb 2008 09:58:48 -0400 (AST) Received: by hyperion.scode.org (Postfix, from userid 1001) id 9C7E8239498; Fri, 15 Feb 2008 14:58:46 +0100 (CET) Date: Fri, 15 Feb 2008 14:58:46 +0100 From: Peter Schuller To: Kenneth Marshall Cc: pgsql-performance@postgresql.org Subject: Re: shared_buffers in 8.3 w/ lots of RAM on dedicated PG machine Message-ID: <20080215135846.GA17327@hyperion.scode.org> References: <20080215123528.GA16532@hyperion.scode.org> <20080215133734.GU12156@it.is.rice.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mYCpIKhGyMATD0i+" Content-Disposition: inline In-Reply-To: <20080215133734.GU12156@it.is.rice.edu> User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/178 X-Sequence-Number: 28720 --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > PostgreSQL still depends on the OS for file access and caching. I > think that the current recommendation is to have up to 25% of your > RAM in the shared buffer cache. This feels strange. Given a reasonable amount of RAM (let's say 8 GB in this case), I cannot imagine why 75% of that would be efficiently used for anything but the buffer cache (ignoring work_mem, stacks, etc). Obviously the OS will need memory to do it's usual stuff (buffering to do efficient I/O, and so on). But the need for that should not increase with the amount of RAM in the machine, all else being equal. What type of file I/O, other than reading pages of PostgreSQL data which are eligable for the PostgreSQL buffer cache, does PostgreSQL do that would take advantage of the operating system caching so much data? (Assuming the database is not extreme to the point of file system meta data being huge.) If the 25% rule still holds true, even under circumstances where the assumption is that the PostgreSQL buffer cache is more efficient (in terms of hit ratio) at caching PostgreSQL database data pages, it would be useful to understand why in order to understand the trade-offs involved and make appropriate decisions. Or is it a matter of PostgreSQL doing non-direct I/O, such that anything cached in shared_buffers will also be cached by the OS? --=20 / Peter Schuller PGP userID: 0xE9758B7D or 'Peter Schuller ' Key retrieval: Send an E-Mail to getpgpkey@scode.org E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org --mYCpIKhGyMATD0i+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHtZqVDNor2+l1i30RAuDvAJ983Z+P0Y9tRfV1ehP9fZxfaHWgVQCfd+3Q y5pDvjRTROttDzhUQ/LWh6Q= =UlcY -----END PGP SIGNATURE----- --mYCpIKhGyMATD0i+--