Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 8A7A76576E for ; Tue, 31 Jul 2012 05:50:33 -0300 (ADT) Received: from 10610.x.rootbsd.net ([204.109.60.69] helo=vps001.shopzeus.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Sw89u-0002fj-1J for pgsql-performance@postgresql.org; Tue, 31 Jul 2012 08:50:32 +0000 Received: from [192.168.1.105] (localhost [127.0.0.1]) by vps001.shopzeus.com (8.14.3/8.14.3) with ESMTP id q6V8oE6E048767; Tue, 31 Jul 2012 04:50:15 -0400 (EDT) (envelope-from gandalf@shopzeus.com) Message-ID: <50179C43.5030607@shopzeus.com> Date: Tue, 31 Jul 2012 10:50:11 +0200 From: Laszlo Nagy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Greg Smith CC: pgsql-performance@postgresql.org Subject: Re: ZFS vs. UFS References: <500E9A3B.3070609@shopzeus.com> <5012261A.8040007@2ndQuadrant.com> In-Reply-To: <5012261A.8040007@2ndQuadrant.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/356 X-Sequence-Number: 47537 > When Intel RAID controller is that? All of the ones on the > motherboard are pretty much useless if that's what you have. Those are > slower than software RAID and it's going to add driver issues you > could otherwise avoid. Better to connect the drives to the non-RAID > ports or configure the controller in JBOD mode first. > > Using one of the better RAID controllers, one of Dell's good PERC > models for example, is one of the biggest hardware upgrades you could > make to this server. If your database is mostly read traffic, it > won't matter very much. Write-heavy loads really benefit from a good > RAID controller's write cache. Actually, it is a PERC with write-cache and BBU. > > ZFS will heavily use server RAM for caching by default, much more so > than UFS. Make sure you check into that, and leave enough RAM for the > database to run too. (Doing *some* caching that way is good for > Postgres; you just don't want *all* the memory to be used for that) Right now, the size of the database is below 5GB. So I guess it will fit into memory. I'm concerned about data safety and availability. I have been in a situation where the RAID card went wrong and I was not able to recover the data because I could not get an identical RAID card in time. I have also been in a situation where the system was crashing two times a day, and we didn't know why. (As it turned out, it was a bug in the "stable" kernel and we could not identify this for two weeks.) However, we had to do fsck after every crash. With a 10TB disk array, it was extremely painful. ZFS is much better: short recovery time and it is RAID card independent. So I think I have answered my own question - I'm going to use ZFS to have better availability, even if it leads to poor performance. (That was the original question: how bad it it to use ZFS for PostgreSQL, instead of the native UFS.) > > Moving disks to another server is a very low probability fix for a > broken system. The disks are a likely place for the actual failure to > happen at in the first place. Yes, but we don't have to worry about that. raidz2 + hot spare is safe enough. The RAID card is the only single point of failure. > I like to think more in terms of "how can I create a real-time replica > of this data?" to protect databases, and the standby server for that > doesn't need to be an expensive system. That said, there is no reason > to set things up so that they only work with that Intel RAID > controller, given that it's not a very good piece of hardware anyway. I'm not sure how to create a real-time replica. This database is updated frequently. There is always a process that reads/writes into the database. I was thinking about using slony to create slave databases. I have no experience with that. We have a 100Mbit connection. I'm not sure how much bandwidth we need to maintain a real-time slave database. It might be a good idea. I'm sorry, I feel I'm being off-topic.