X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 370A4DB129 for ; Thu, 27 Oct 2005 19:55:16 -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 75959-01 for ; Thu, 27 Oct 2005 22:55:13 +0000 (GMT) Received: from flake.decibel.org (flake.decibel.org [67.100.216.10]) by svr1.postgresql.org (Postfix) with ESMTP id A70FFDB123 for ; Thu, 27 Oct 2005 19:55:14 -0300 (ADT) Received: by flake.decibel.org (Postfix, from userid 1001) id 9083A1529A; Thu, 27 Oct 2005 17:55:17 -0500 (CDT) Date: Thu, 27 Oct 2005 17:55:17 -0500 From: "Jim C. Nasby" To: Ron Peacetree Cc: PostgreSQL , pgsql-performance@postgresql.org Subject: Re: How much memory? Message-ID: <20051027225517.GU63747@pervasive.com> References: <7021105.1130452773950.JavaMail.root@elwamui-norfolk.atl.sa.earthlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7021105.1130452773950.JavaMail.root@elwamui-norfolk.atl.sa.earthlink.net> X-Operating-System: FreeBSD 4.11-RELEASE-p10 i386 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.008 required=5 tests=[AWL=0.008] X-Spam-Score: 0.008 X-Spam-Level: X-Archive-Number: 200510/437 X-Sequence-Number: 15205 On Thu, Oct 27, 2005 at 06:39:33PM -0400, Ron Peacetree wrote: > Databases basically come in 4 sizes: > > 1= The entire DB fits into memory. > 2= The performance critical table(s) fit(s) into memory > 3= The indexes of the performance critical table(s) fit into memory. > 4= Neither the performance critical tables nor their indexes fit into memory. > > Performance decreases (exponentially), and development + maintenance cost/difficulty/pain increases (exponentially), as you go down the list. > > While it is often not possible to be in class "1" above, do everything you can to be in at least class "3" and do everything you can to avoid class "4". > > At ~$75-$150 per GB as of this post, RAM is the cheapest investment you can make in a high perfomance, low hassle DBMS. IWill's and Tyan's 16 DIMM slot mainboards are worth every penny. And note that your next investment after RAM should be better disk IO. More CPUs *generally* don't buy you much (if anything). My rule of thumb: the only time your database should be CPU-bound is if you've got a bad design*. *NOTE: before everyone goes off about query parallelism and big in-memory sorts and what-not, keep in mind I said "rule of thumb". :) -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461