Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKvOk-0007pw-0J for pgsql-performance@arkaria.postgresql.org; Wed, 06 Jul 2016 22:34:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bKvOj-0002RQ-CE for pgsql-performance@arkaria.postgresql.org; Wed, 06 Jul 2016 22:34:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bKvOh-0002Qb-7Z for pgsql-performance@postgresql.org; Wed, 06 Jul 2016 22:34:23 +0000 Received: from mailout.micron.com ([137.201.242.129]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bKvOd-0008Hn-Fc for pgsql-performance@postgresql.org; Wed, 06 Jul 2016 22:34:22 +0000 Received: from mail.micron.com (bowex17c.micron.com [137.201.21.211]) by mailout.micron.com (8.14.4/8.14.6) with ESMTP id u66MYD2L002703; Wed, 6 Jul 2016 16:34:13 -0600 Received: from bowex17a.micron.com (137.201.21.209) by bowex17c.micron.com (137.201.21.211) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 6 Jul 2016 16:34:12 -0600 Received: from bowex17a.micron.com ([fe80::e548:23cf:776f:a1d0]) by bowex17a.micron.com ([fe80::e548:23cf:776f:a1d0%22]) with mapi id 15.00.1178.000; Wed, 6 Jul 2016 16:34:12 -0600 From: "Wes Vaske (wvaske)" To: Merlin Moncure , Kaixi Luo CC: postgres performance list Subject: Re: Tuning guidelines for server with 256GB of RAM and SSDs? Thread-Topic: [PERFORM] Tuning guidelines for server with 256GB of RAM and SSDs? Thread-Index: AQHR1szUqqe//YG0zUmGaPeS9HkTUqAMGxCA///gGJc= Date: Wed, 6 Jul 2016 22:34:12 +0000 Message-ID: <1467844446520.50691@micron.com> References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [137.201.20.7] x-tm-as-product-ver: SMEX-11.0.0.4255-8.000.1202-22434.005 x-tm-as-result: No--49.277600-0.000000-31 x-tm-as-user-approved-sender: Yes x-tm-as-user-blocked-sender: No x-mt-checkinternalsenderrule: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 137.201.82.98 X-Pg-Spam-Score: -5.5 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Regarding the Nordeus blog Merlin linked. They say: "This doesn't mean the data was really written to disk, it can still remain= in the disk cache, but enterprise drives usually make sure the data was re= ally written to disk on fsync calls." This isn't actually true for enterprise drives (when I say enterprise in th= e context of an SSD, I'm assuming full power loss protection via capacitors= on the drive like the Intel DC S3x00 series). Most enterprise SSDs will ig= nore calls to disable disk cache or to flush the disk cache as doing so is = entirely unnecessary. Regarding write back cache: Disabling the write back cache won't have a real large impact on the endura= nce of the drive unless it reduces the total number of bytes written (which= it won't). I've seen drives that perform better with it disabled and drive= s that perform better with it enabled. I would test in your environment and= make the decision based on performance.=20 Regarding the Crucial drive for logs: As far as I'm aware, none of the Crucial drives have power loss protection.= To use these drives you would want to disable disk cache which would drop = your performance a fair bit. Write amplification: I wouldn't expect write amplification to be a serious issue unless you hit = every LBA on the device early in its life and never execute TRIM. This is o= ne of the reasons software RAID can be a better solution for something like= this. MDADM supports TRIM in RAID devices. So unless you run the drives a= bove 90% full, the write amplification would be minimal so long as you have= a daily fstrim cron job. Wes Vaske | Senior Storage Solutions Engineer Micron Technology ________________________________________ From: pgsql-performance-owner@postgresql.org on behalf of Merlin Moncure Sent: Wednesday, July 6, 2016 1:13 PM To: Kaixi Luo Cc: postgres performance list Subject: Re: [PERFORM] Tuning guidelines for server with 256GB of RAM and S= SDs? On Tue, Jul 5, 2016 at 9:50 AM, Kaixi Luo wrote: > Hello, > > I've been reading Mr. Greg Smith's "Postgres 9.0 - High Performance" book > and I have some questions regarding the guidelines I found in the book, > because I suspect some of them can't be followed blindly to the letter on= a > server with lots of RAM and SSDs. > > Here are my server specs: > > Intel Xeon E5-1650 v3 Hexa-Core Haswell > 256GB DDR4 ECC RAM > Battery backed hardware RAID with 512MB of WriteBack cache (LSI MegaRAID = SAS > 9260-4i) > RAID1 - 2x480GB Samsung SSD with power loss protection (will be used to > store the PostgreSQL database) > RAID1 - 2x240GB Crucial SSD with power loss protection. (will be used to > store PostgreSQL transactions logs) > > First of all, the book suggests that I should enable the WriteBack cache = of > the HWRAID and disable the disk cache to increase performance and ensure > data safety. Is it still advisable to do this on SSDs, specifically the s= tep > of disabling the disk cache? Wouldn't that increase the wear rate of the > SSD? At the time that book was written, the majority of SSDs were known not to be completely honest and/or reliable about data integrity in the face of a power event. Now it's a hit or miss situation (for example, see here: http://blog.nordeus.com/dev-ops/power-failure-testing-with-ssds.h= tm). The intel drives S3500/S3700 and their descendants are the standard against which other drives should be judged IMO. The S3500 family in particular offers tremendous value for database usage. Do your research; the warning is still relevant but the blanket statement no longer applies. Spinning drives are completely obsolete for database applications in my experience. Disabling write back cache for write heavy database loads will will destroy it in short order due to write amplication and will generally cause it to underperform hard drives in my experience. With good SSDs and a good motherboard, I do not recommend a caching raid controller; software raid is a better choice for many reasons. One parameter that needs to be analyzed with SSD is effective_io_concurrency. see https://www.postgresql.org/message-id/CAHyXU0yiVvfQAnR9cyH%3DHWh1WbLRsioe%3= DmzRJTHwtr%3D2azsTdQ%40mail.gmail.com merlin -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance