Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E23EDB5DBDC for ; Wed, 24 Aug 2011 16:26:53 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 22664-01 for ; Wed, 24 Aug 2011 19:26:47 +0000 (UTC) X-Greylist: delayed 00:13:03.578281 by SQLgrey-1.7.6 Received: from bifrost.lang.hm (mail.lang.hm [64.81.33.126]) by mail.postgresql.org (Postfix) with ESMTP id 47033B5DBC4 for ; Wed, 24 Aug 2011 16:26:47 -0300 (ADT) Received: from asgard.lang.hm (asgard.lang.hm [10.0.0.100]) by bifrost.lang.hm (8.13.4/8.13.4/Debian-3) with ESMTP id p7OJDca1021640; Wed, 24 Aug 2011 12:13:38 -0700 Date: Wed, 24 Aug 2011 12:13:38 -0700 (PDT) From: david@lang.hm X-X-Sender: dlang@asgard.lang.hm To: Merlin Moncure cc: gnuoytr@rcn.com, pgsql-performance@postgresql.org Subject: Re: Reports from SSD purgatory In-Reply-To: Message-ID: References: <4E49B0A0.2060705@2ndQuadrant.com> <201108241848.061232@ms14.lnh.mail.rcn.net> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.432 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.532 X-Spam-Level: X-Archive-Number: 201108/281 X-Sequence-Number: 44728 On Wed, 24 Aug 2011, Merlin Moncure wrote: > On Wed, Aug 24, 2011 at 1:48 PM, wrote: >> >> >> >> Also, given that PG is *nix centric and support for TRIM is win >> centric, having that makes a big difference in performance. > > one point about TRIM -- no raid controller that I know of supports > trim, which suggests it might not even be possible to support. How > much does it help really? Probably not as much as you would think > because newer SSD drives have very sophisticated controllers that make > it at least partially obsolete. if the SSD can know that the user doesn't care about data in a particular block, the SSD can overwrite that block with new data. Since the SSDs do their writing to new blocks and erase old blocks later, the more empty blocks you have available, the less likely you are to hit a garbage collection pause when you try to write to the drive. if you are careful to never write temporary files to the drive and only use it for database-like 'update in place' type of things (no 'write a new file and then rename it over the old one' tricks), then TRIM won't make any difference because every block that you have ever written to is one that you care about (or close enough to this for practical purposes) but if you don't take this care, the drive works to preserve all the data blocks that you have ever written to, even if the filesystem has freed them and dosn't care about them. The worst case would be a log strcutured filesystem (btrfs for example) where every write is to a new block and then the old block is freed later. David Lang