Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKRiP-0003yi-Fz for pgsql-performance@arkaria.postgresql.org; Tue, 05 Jul 2016 14:52:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bKRiP-0003B5-1f for pgsql-performance@arkaria.postgresql.org; Tue, 05 Jul 2016 14:52:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bKRgi-0007SI-3D for pgsql-performance@postgresql.org; Tue, 05 Jul 2016 14:51:00 +0000 Received: from mail-vk0-x235.google.com ([2607:f8b0:400c:c05::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bKRgf-00070T-Hf for pgsql-performance@postgresql.org; Tue, 05 Jul 2016 14:50:58 +0000 Received: by mail-vk0-x235.google.com with SMTP id c2so267621303vkg.1 for ; Tue, 05 Jul 2016 07:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=TWW/DMRjX9T7T2ZYOzGHVdFDBTDW6cYAdSkEwkabbpg=; b=etHCoekyMUn1fWXTfHl0euSOWQcVlYRqMvpJUcN9jvOcvvIckJu/TpTuSoyLwUDuzh Yijc/T6wyKNqIlPWCpm7+Zg9F3FUuCGAjeWy1GaN85axA2OJjWGP4rczFgLNqyXfSvz5 RyRK+m/lnGIACAscEqC+mYMXCzam4gt7Xl91NMxQFcRK/LLVnaW36xxa85MkakbFyXk2 1FhK7rfT+P2i1v5Y7YC8RXVyxRx2CMD5IPziLbx/bHcyCNQ6caPjdZym+OGxG5uJs3kO A3/m8tAb+0Yw8aGB0SjbD56bjFTKPE/VX/PTTliVl/qfAu4mj80OqisTeZpyD/KVzyNY 1b+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=TWW/DMRjX9T7T2ZYOzGHVdFDBTDW6cYAdSkEwkabbpg=; b=dV2h49ZM47fjc1XUYGJ1LOA6X/RlaIpqdUr0EIbK6yFSol908PYbuw9uN4X2S3xK8C klsfEosQd8DM19g06cT/KL9pASFVqIiNEPRJIAXU5+6MLdO4aAXtZNAImzKVoFzlp2hL g98Qec1z0RGCiOJ4ompCFt5h4zRgFTqJKbGsWv0oKif08WTZdtX0Y1TAUeD1eELWZnss i5wF+UGRvrJcMDS0AOTxwC77sFbagLJMLzrRNNW2YYIU9iLJbBsiNUxK7aDsezwWFYzH WxBTFJkw6XPVoBvkONM6C/1J+HrZlSGYMegC3Jt0MoM6iV9tS1hhuPCcdAq0uDbyBfwj BsQw== X-Gm-Message-State: ALyK8tI040PhO0uHJ1+TYuxmgtI3nY76cRLLd+lo5bSVaP/3abWcq1htXKHp36bv8/YtQXzb3cGIoFuRlPnZKg== X-Received: by 10.31.63.87 with SMTP id m84mr6387040vka.23.1467730256331; Tue, 05 Jul 2016 07:50:56 -0700 (PDT) MIME-Version: 1.0 From: Kaixi Luo Date: Tue, 05 Jul 2016 14:50:46 +0000 Message-ID: Subject: Tuning guidelines for server with 256GB of RAM and SSDs? To: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary=001a114dccea8e0b110536e494e4 X-Pg-Spam-Score: -2.7 (--) 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 --001a114dccea8e0b110536e494e4 Content-Type: text/plain; charset=UTF-8 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 step of disabling the disk cache? Wouldn't that increase the wear rate of the SSD? Secondly, the book suggests that we increase the device readahead from 256 to 4096. As far as I understand, this was done in order to reduce the number of seeks on a rotating hard drive, so again, is this still applicable to SSDs? The other tunable I've been looking into is vm.dirty_ratio and vm.dirty_background_ratio. I reckon that the book's recommendation to lower vm.dirty_background_ratio to 5 and vm.dirty_ratio to 10 is not enough for a server with such big amount of RAM. How much lower should I set these values, given that my RAID's WriteBack cache size is 512MB? Thank you very much. Kaixi Luo --001a114dccea8e0b110536e494e4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

I've been reading Mr. Greg S= mith'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 l= ots of RAM and SSDs.

Here are my server specs:

Intel Xeon E5-1650 v3=C2=A0Hexa-Core Haswell=C2=A0
256GB DDR4 ECC RA= M
Battery backed hardware RAID with 512MB of WriteBack cache (LSI= MegaRAID SAS 9260-4i)
RAID1 - 2x480GB Samsung SSD with power los= s protection (will be used to store the PostgreSQL database)
RAID= 1 - 2x240GB Crucial SSD with power loss protection. (will be used to store = PostgreSQL transactions logs)

First of all, the bo= ok suggests that I should enable the WriteBack cache of the HWRAID and disa= ble the disk cache to increase performance and ensure data safety. Is it st= ill advisable to do this on SSDs, specifically the step of disabling the di= sk cache? Wouldn't that increase the wear rate of the SSD?
Secondly, the book suggests that we increase the device readah= ead from 256 to 4096. As far as I understand, this was done in order to red= uce the number of seeks on a rotating hard drive, so again, is this still a= pplicable to SSDs?

The other tunable I've been= looking into is vm.dirty_ratio and vm.dirty_background_ratio. I reckon tha= t the book's recommendation to lower vm.dirty_background_ratio to 5 and= vm.dirty_ratio to 10 is not enough for a server with such big amount of RA= M. How much lower should I set these values, given that my RAID's Write= Back cache size is 512MB?

Thank you very much.

Kaixi Luo
--001a114dccea8e0b110536e494e4--