X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DB96F52ADA for ; Fri, 8 Jul 2005 14:19:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 44635-05 for ; Fri, 8 Jul 2005 17:19:49 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id C162152ABD for ; Fri, 8 Jul 2005 14:19:43 -0300 (ADT) X-EthosMedia-Virus-Scanned: no infections found Received: from [64.81.245.111] (account josh@agliodbs.com HELO temoku.sf.agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 7586968; Fri, 08 Jul 2005 10:21:54 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org Subject: Re: Mount database on RAM disk? Date: Fri, 8 Jul 2005 10:22:01 -0700 User-Agent: KMail/1.8 Cc: Stuart Bishop References: <42CDD7B8.6050109@stuartbishop.net> In-Reply-To: <42CDD7B8.6050109@stuartbishop.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507081022.01680.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.045 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200507/91 X-Sequence-Number: 13332 Stuart, > I'm putting together a road map on how our systems can scale as our load > increases. As part of this, I need to look into setting up some fast > read only mirrors of our database. We should have more than enough RAM > to fit everything into memory. I would like to find out if I could > expect better performance by mounting the database from a RAM disk, or > if I would be better off keeping that RAM free and increasing the > effective_cache_size appropriately. If you're accessing a dedicated, read-only system with a database small enough to fit in RAM, it'll all be cached there anyway, at least on Linux and BSD. You won't be gaining anything by creating a ramdisk. BTW, effective_cache_size doesn't determine the amount of caching done. It just informs the planner about how much db is likely to be cached. The actual caching is up to the OS/filesystem. -- --Josh Josh Berkus Aglio Database Solutions San Francisco