Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D99D164FD1A for ; Tue, 22 Jul 2008 11:08:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 49812-03 for ; Tue, 22 Jul 2008 11:08:31 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from web25804.mail.ukl.yahoo.com (web25804.mail.ukl.yahoo.com [217.12.10.189]) by postgresql.org (Postfix) with SMTP id 9B54D64FD29 for ; Tue, 22 Jul 2008 11:08:36 -0300 (ADT) Received: (qmail 79995 invoked by uid 60001); 22 Jul 2008 14:08:32 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=N3vj6K1D3uRT6kcFLyh4wt8Fpe4UB6cNDz0nONx0xr123nxT43TdkXtol2R/G6v7gz/GS6mRkwvXFpcr33qIXsr2ECztiJsIEAsbkgZxlI1fA/g1baHno3lJzxdf8aahP5FgpPzkBvfUG432sWZTNqSx7imkMgkeP3v1dn+4KoE=; Received: from [62.254.183.162] by web25804.mail.ukl.yahoo.com via HTTP; Tue, 22 Jul 2008 14:08:32 GMT X-Mailer: YahooMailWebService/0.7.218 Date: Tue, 22 Jul 2008 14:08:32 +0000 (GMT) From: Valentin Bogdanov Reply-To: valiouk@yahoo.co.uk Subject: Re: shared_buffers and shmmax To: posgres support , dx k9 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <818191.79570.qm@web25804.mail.ukl.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.315 tagged_above=0 required=5 tests=SARE_MILLIONSOF=0.315 X-Spam-Level: X-Archive-Number: 200807/186 X-Sequence-Number: 29796 shared_buffers is in disk block size, typically 8K, at least that's what it= is on Linux platforms. shmmax is quite simply in bytes. The default shared_buffer of a 1000 is quite conservative. A good starting = value is something like 15-25 percent of your main memory or so I am being = told. It really depends on how the machine you have your database on is bei= ng used. If postgres is the only application using your box then you can ev= en set this to 80% of the memory. You're fine as long as postgres does not = have to resort to using the swap space. If you set shared_buffers so high that it doesn't agree with your systems s= hmmax then postgres will give you the required value on startup. Regards, Val --- On Tue, 22/7/08, dx k9 wrote: > From: dx k9 > Subject: [ADMIN] shared_buffers and shmmax > To: "posgres support" > Date: Tuesday, 22 July, 2008, 2:39 PM > Hi, > I'm trying to understand what the documentation means > by bytes per increment, what is the increment supposed to > be bytes, MB, or Kb. I have my shared_buffers set to 577 > MB(4 instances) and I'm multiplying by 8400 bytes. I > would think I would want to keep everything in bytes and > not mulitply bytes times MB, but this is what table 17-2 > implies. If I convert 577 to bytes and multiply, my > calculator goes exponential on me. I'm going through > this table and adding up to see what my shmmax should be > (it's 7.5 GB) out of a total memory of 16 GB with 1000 > max_connections right now. What should I use as the > "increment" value in regards to shared buffers, > 577, 590848 or 605028352 ?=20 > =20 > a) 577 MB (This seems too small) > b) 590,848 Kb (this seems just right) > c) 605,028,352 bytes (this seems too big, I hope it's > not c) > =20 > Thanks, > ~DjK > =20 > Table 17-2. Configuration parameters affecting > PostgreSQL's shared memory usage >=20 >=20 >=20 >=20 >=20 >=20 >=20 > Name > Approximate multiplier (bytes per increment) as of 8.3 >=20 >=20 > max_connections > 1800 + 270 * max_locks_per_transaction >=20 > autovacuum_max_workers > 1800 + 270 * max_locks_per_transaction >=20 > max_prepared_transactions > 770 + 270 * max_locks_per_transaction >=20 > shared_buffers > 8400 (assuming 8 kB BLCKSZ) >=20 > wal_buffers > 8200 (assuming 8 kB XLOG_BLCKSZ) >=20 > max_fsm_relations > 70 >=20 > max_fsm_pages > 6 >=20 > Fixed space requirements > 770 kB > _________________________________________________________________ > Stay in touch when you're away with Windows Live > Messenger. > http://www.windowslive.com/messenger/overview.html?ocid=3DTXT_TAGLM_WL_me= ssenger2_072008=0A=0A=0A _____________________________________________= _____________=0ANot happy with your email address?.=0AGet the one you reall= y want - millions of new email addresses available now at Yahoo! http://uk.= docs.yahoo.com/ymail/new.html