X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 105CCD1C4D0 for ; Wed, 30 Jul 2003 22:10:24 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 93668-04 for ; Wed, 30 Jul 2003 19:09:24 -0300 (ADT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 58789D1C4D5 for ; Wed, 30 Jul 2003 19:10:22 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id h6UMAOp15472; Wed, 30 Jul 2003 18:10:24 -0400 (EDT) From: Bruce Momjian Message-Id: <200307302210.h6UMAOp15472@candle.pha.pa.us> Subject: Re: Mapping a database completly into Memory In-Reply-To: To: Vivek Khera Date: Wed, 30 Jul 2003 18:10:24 -0400 (EDT) Cc: pgsql-performance@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/491 X-Sequence-Number: 2784 I think it all depends on your working set. Having shared memory be smaller than you working set causes pages to have to be copied in from the kernel buffers (not a huge problem, but a small penalty), while having shared memory larger than the working set causes overhead of searching through all those buffers. --------------------------------------------------------------------------- Vivek Khera wrote: > >>>>> "TL" == Tom Lane writes: > > TL> Franco Bruno Borghesi writes: > >> wouldn't also increasing shared_buffers to 64 or 128 MB be a good > >> performance improvement? This way, pages belonging to heavily used > >> indexes would be already cached by the database itself. > > TL> Not necessarily. The trouble with large shared_buffers settings is you > TL> end up with lots of pages being doubly cached (both in PG's buffers and > > I think if you do a lot of inserting/updating to your table, then more > SHM is better (and very high fsm settings), since you defer pushing > out the dirty pages to the disk. For read-mostly, I agree that > letting the OS do the caching is a better way. > > > -- > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > Vivek Khera, Ph.D. Khera Communications, Inc. > Internet: khera@kciLink.com Rockville, MD +1-240-453-8497 > AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/ > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073