Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 06E73B5DBCC for ; Fri, 17 Jun 2011 06:30:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 25826-08 for ; Fri, 17 Jun 2011 09:30:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from shrek.krogh.cc (2605ds1-ynoe.0.fullrate.dk [90.184.12.24]) by mail.postgresql.org (Postfix) with ESMTP id A9EF3B5DBE6 for ; Fri, 17 Jun 2011 06:30:38 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by shrek.krogh.cc (Postfix) with ESMTP id EE7E5339296; Fri, 17 Jun 2011 11:30:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at shrek.krogh.cc Received: from shrek.krogh.cc ([127.0.0.1]) by localhost (shrek.krogh.cc [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g9TSBYVRQaD4; Fri, 17 Jun 2011 11:30:33 +0200 (CEST) Received: from shrek.krogh.cc (localhost [127.0.0.1]) by shrek.krogh.cc (Postfix) with ESMTP id 7D4703389DC; Fri, 17 Jun 2011 11:30:32 +0200 (CEST) Received: from 94.101.220.16 (SquirrelMail authenticated user jesper@krogh.cc) by shrek.krogh.cc with HTTP; Fri, 17 Jun 2011 11:30:33 +0200 (CEST) Message-ID: In-Reply-To: References: <4DFA4EB7.1020701@2ndQuadrant.com> Date: Fri, 17 Jun 2011 11:30:33 +0200 (CEST) Subject: Re: Performance advice for a new low(er)-power server From: jesper@krogh.cc To: "Haestan" Cc: "Greg Smith" , pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.15 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201106/152 X-Sequence-Number: 44085 > On Jun 16, 2011, at 20:43, Greg Smith wrote: >> The layout you proposed (OS+WAL , data) might be effective, but if your >> write volume is low it may not be much of an improvement at all over a >> simple RAID1 of two drives. The odds that you are going to correctly >> lay out individual sections of a disk array with only two pairs to >> spread the data across aren't good. If this is all you have to work >> with, a 4-disk RAID10 would at least guarantee you're taking advantage >> of all four drives. With that controller, it should be almost twice as >> fast in all cases as hooking up only two drives. > > The data is more or less constantly rewritten (it contains hourly updated > travel related data). Therefore, I really tend to buy 4 disks from the > start on. Just make sure you have a Battery-backed-write cache or flash backed, so you can set it safely to "write-back". >> There is another possibility I would suggest you consider. You could >> buy the server with a single pair of drives now, then wait to see what >> performance is like before filling the other two slots. It is far >> easier to figure out what drive technology makes sense if you have >> measurements from an existing system to guide that decision. And you >> may be able to get newer drives from your vendor that slide into the >> empty slots. You may not ever even need more than a single RAID-1 pair. >> I see lots of people waste money on drives that would be better spent >> on RAM. > > Actually, there are already two older servers in place right now. The data > is about 14GB in size and slowly rising. Considering the price for RAM I > can easily afford to install more RAM than the db data is in size. I was > aiming for 24GB. But even then, I cannot be sure that no queries will read > from the disk. AFAIK, there is no way to force all the data to stay in > cache (shared_buffers for example). tar cf - $PGDATA > /dev/null in cron every now and then /15-30 minutes) would certainly do the trick . not pretty but we're solving problems not talking about beauty. If you can ensure sufficient memory then it should cause any problems.. if you graph the timing of above command you should even be able to see when you need to add more memory. -- Jesper