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

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

From
"Mkrtchyan, Tigran"
Date:
<p dir="ltr">Hi, <p dir="ltr">We had a similar situation and the best performance was with 64MB background_bytes and
512MB dirty_bytes.<p dir="ltr">Tigran.<br /><div class="gmail_quote">On Jul 5, 2016 16:51, Kaixi Luo
<kaixiluo@gmail.com>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'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,
becauseI suspect some of them can'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-CoreHaswell </span></div></div><div>256GB DDR4 ECC RAM</div><div>Battery backed hardware
RAIDwith 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
suggeststhat I should enable the WriteBack cache of the HWRAID and disable the disk cache to increase performance and
ensuredata safety. Is it still advisable to do this on SSDs, specifically the step of disabling the disk cache?
Wouldn'tthat increase the wear rate of the SSD?</div><div><br /></div><div>Secondly, the book suggests that we increase
thedevice readahead from 256 to 4096. As far as I understand, this was done in order to reduce the number of seeks on a
rotatinghard drive, so again, is this still applicable to SSDs?</div><div><br /></div><div>The other tunable I've been
lookinginto is vm.dirty_ratio and vm.dirty_background_ratio. I reckon that the book's recommendation to lower
vm.dirty_background_ratioto 5 and vm.dirty_ratio to 10 is not enough for a server with such big amount of RAM. How much
lowershould I set these values, given that my RAID's WriteBack cache size is 512MB?</div><div><br /></div><div>Thank
youvery much.</div><div><br /></div><div>Kaixi Luo</div></div></blockquote></div> 

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

From
Mark Kirkwood
Date:
On 06/07/16 07:17, Mkrtchyan, Tigran wrote:
> Hi,
>
> We had a similar situation and the best performance was with 64MB
> background_bytes and 512 MB dirty_bytes.
>
> Tigran.
>
> On Jul 5, 2016 16:51, Kaixi Luo <kaixiluo@gmail.com> wrote:
>
>
>      Here are my server specs:
>
>      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)
>

Can you tell the exact model numbers for the Samsung and Crucial SSD's?
It typically matters! E.g I have some Crucial M550 that have capacitors
and (originally) claimed to be power off safe, but with testing have
been shown to be not really power off safe at all. I'd be dubious about
Samsungs too.

The Intel Datacenter range (S3700 and similar) are known to have power
off safety that does work.

regards

Mark


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

From
Kaixi Luo
Date:
It's a Crucial CT250MX200SSD1 and a Samsung MZ7LM480HCHP-00003.

Regards,

Kaixi


On Thu, Jul 7, 2016 at 6:59 AM, Mark Kirkwood <mark.kirkwood@catalyst.net.nz> wrote:
On 06/07/16 07:17, Mkrtchyan, Tigran wrote:
Hi,

We had a similar situation and the best performance was with 64MB
background_bytes and 512 MB dirty_bytes.

Tigran.

On Jul 5, 2016 16:51, Kaixi Luo <kaixiluo@gmail.com> wrote:


     Here are my server specs:

     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)


Can you tell the exact model numbers for the Samsung and Crucial SSD's? It typically matters! E.g I have some Crucial M550 that have capacitors and (originally) claimed to be power off safe, but with testing have been shown to be not really power off safe at all. I'd be dubious about Samsungs too.

The Intel Datacenter range (S3700 and similar) are known to have power off safety that does work.

regards

Mark



--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

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

From
"Wes Vaske (wvaske)"
Date:
?The Crucial drive does not have power loss protection. The Samsung drive does.


(The Crucial M550 has capacitors to protect data that's already been written to the device but not the entire cache.
Forinstance, if data is read from the device during a garbage collection operation, the M550 will protect that data
insteadof introducing corruption of old data. This is listed as "power loss protection" on the spec sheet but it's not
thelevel of protection that people on this list would expect from a drive) 


________________________________
From: pgsql-performance-owner@postgresql.org <pgsql-performance-owner@postgresql.org> on behalf of Kaixi Luo
<kaixiluo@gmail.com>
Sent: Thursday, July 7, 2016 2:49 AM
To: Mark Kirkwood
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Tuning guidelines for server with 256GB of RAM and SSDs?

It's a Crucial CT250MX200SSD1 and a Samsung MZ7LM480HCHP-00003.

Regards,

Kaixi


On Thu, Jul 7, 2016 at 6:59 AM, Mark Kirkwood <mark.kirkwood@catalyst.net.nz<mailto:mark.kirkwood@catalyst.net.nz>>
wrote:
On 06/07/16 07:17, Mkrtchyan, Tigran wrote:
Hi,

We had a similar situation and the best performance was with 64MB
background_bytes and 512 MB dirty_bytes.

Tigran.

On Jul 5, 2016 16:51, Kaixi Luo <kaixiluo@gmail.com<mailto:kaixiluo@gmail.com>> wrote:


     Here are my server specs:

     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)


Can you tell the exact model numbers for the Samsung and Crucial SSD's? It typically matters! E.g I have some Crucial
M550that have capacitors and (originally) claimed to be power off safe, but with testing have been shown to be not
reallypower off safe at all. I'd be dubious about Samsungs too. 

The Intel Datacenter range (S3700 and similar) are known to have power off safety that does work.

regards

Mark



--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org<mailto:pgsql-performance@postgresql.org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



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

From
Mark Kirkwood
Date:
On 08/07/16 02:09, Wes Vaske (wvaske) wrote:
> ?The Crucial drive does not have power loss protection. The Samsung drive does.
>
>
> (The Crucial M550 has capacitors to protect data that's already been written to the device but not the entire cache.
Forinstance, if data is read from the device during a garbage collection operation, the M550 will protect that data
insteadof introducing corruption of old data. This is listed as "power loss protection" on the spec sheet but it's not
thelevel of protection that people on this list would expect from a drive) 
>

Yes - the MX200 board (see):

http://www.anandtech.com/show/9258/crucial-mx200-250gb-500gb-1tb-ssd-review

looks to have the same sort of capacitors that the M550 uses, so not
ideal for db or transaction logs!

Cheers

Mark