Thread: Data on NAS / NFS
Hi list, I'm looking for advices / experiences concerning PostgreSQL with data storage on NAS via NFS. I've found a few references in the archives or the docs, but they are old, and opinions differ: . "There are a lot of horror stories concerning running databases (not only Postgres) over NFS." http://archives.postgresql.org/pgsql-performance/2004-06/msg00217.php . "NFS and other remote file systems are not recommended for use by POSTGRESQL. NFS does not have the same file system semantics as a local file system, and these inconsistencies can cause data reliability or crash recovery problems." http://www.postgresql.org/files/documentation/books/aw_pgsql/hw_performance/node11.html . "The problem with NFS is not so much the protocol, but whether your server is reliable. If you trust that your NAS device is reliable enough, then you should be OK." http://archives.postgresql.org/pgsql-general/2005-11/msg01362.php The NAS would be from LaCie, using 4 disks (Raid5 + spare) (http://www.lacie.com/fr/products/product.htm?pid=10876), mounted via NFS from a Linux server running Postgresql . What are the implications with regard to PostgreSQL performance and (more important) reliability? Thanks in advance. Regards, -- Jean-Denis Girard SysNux Systèmes Linux en Polynésie française http://www.sysnux.pf/ Tél: +689 483 527 / GSM: +689 797 527
On Fri, 27 Jul 2007, Jean-Denis Girard wrote: > The NAS would be from LaCie, using 4 disks (Raid5 + spare) > (http://www.lacie.com/fr/products/product.htm?pid=10876), mounted via NFS > from a Linux server running Postgresql . Leaving aside the general issue here for others to chime in on (my opinion is that putting a PostgreSQL database on this class of network storage would be crazy but I have no hard data to support that), I would strongly recommend against any of LaCie's products in this area. The company got a decent reputation based on their early Mac Firewire products, but it's been a number of years since they released any product that I would consider worth storing even a byte of data on. Their designs are buggy from day one, the reliability is awful, and the issues stem from their bridge chipsets. It took me only seconds to find a sample page with multiple anecdotal samples on this subject: http://reviews.pricegrabber.com/hard-drives/m/11165851/ The problems with their products are so widespread I'm sure it would be easy for you to find many more if you search around a bit. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD
I've had trouble with NFS files on nfs filesystems disappearing for a second and reappearing. I had to add a retry loop with a delay in my code that does file reading. I wouldn't try running a production level postgres over nfs.
On 28.07.2007 06:48, Jean-Denis Girard wrote: > The NAS would be from LaCie, using 4 disks (Raid5 + spare) > (http://www.lacie.com/fr/products/product.htm?pid=10876), mounted via > NFS from a Linux server running Postgresql . Sorry, but that sounds like a sick setup.. 1.) RAID 5 is a bad choice for a DBMS, due to implicit reads caused by parity calculation. 2.) Most cheap NAS (such as this one) have way to high latency for a DBMS. 3.) NFS is nothing you want to have a DBMS running on top. 4.) I don't think this device has battery backed cache. 5.) At least I have bad experiences with Lacie storage devices (Bigger Disk Extreme) To sum it up.. I'd say what you get with that setup is a dead slow, unstable PostgreSQL experience with a good chance of data corruption on power failure. -- Regards, Hannes Dorbath