Re: Tuning guidelines for server with 256GB of RAM and SSDs?

From: "Mkrtchyan, Tigran" <tigran(dot)mkrtchyan(at)desy(dot)de>
To: Kaixi Luo <kaixiluo(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Tuning guidelines for server with 256GB of RAM and SSDs?
Date: 2016-07-05 19:17:33
Message-ID: 89036cd7-e798-4e2a-a6bd-ab98641a452a@email.android.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

<p dir="ltr">Hi, </p>
<p dir="ltr">We had a similar situation and the best performance was with 64MB background_bytes and 512 MB dirty_bytes.</p>
<p dir="ltr">Tigran.<br>
</p>
<div class="gmail_quote">On Jul 5, 2016 16:51, Kaixi Luo &lt;kaixiluo(at)gmail(dot)com&gt; wrote:<br type='attribution'><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br /></div><div>I&#39;ve been reading Mr. Greg Smith&#39;s &#34;Postgres 9.0 - High Performance&#34; book and I have some questions regarding the guidelines I found in the book, because I suspect some of them can&#39;t be followed blindly to the letter on a server with lots of RAM and SSDs.</div><div><br /></div><div>Here are my server specs:</div><div><br /></div><div><div>Intel Xeon E5-1650 v3 <span style="line-height:1.5">Hexa-Core Haswell </span></div></div><div>256GB DDR4 ECC RAM</div><div>Battery backed hardware RAID with 512MB of WriteBack cache (LSI MegaRAID SAS 9260-4i)</div><div>RAID1 - 2x480GB Samsung SSD with power loss protection (will be used to store the PostgreSQL database)</div><div>RAID1 - 2x240GB Crucial SSD with power loss protection. (will be used to store PostgreSQL transactions logs)</div><div><br /></div><div>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&#39;t that increase the wear rate of the SSD?</div><div><br /></div><div>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?</div><div><br /></div><div>The other tunable I&#39;ve been looking into is vm.dirty_ratio and vm.dirty_background_ratio. I reckon that the book&#39;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&#39;s WriteBack cache size is 512MB?</div><div><br /></div><div>Thank you very much.</div><div><br /></div><div>Kaixi Luo</div></div>
</blockquote></div>

Attachment Content-Type Size
unknown_filename text/html 2.3 KB

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kouber Saparev 2016-07-05 21:03:30 Re: DELETE takes too much memory
Previous Message Josh Berkus 2016-07-05 18:51:54 Re: DELETE takes too much memory