Обсуждение: Re: Tuning guidelines for server with 256GB of RAM and SSDs?

Поиск
Список
Период
Сортировка

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

От
"Mkrtchyan, Tigran"
Дата:

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:
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

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

От
Mark Kirkwood
Дата:
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?

От
Kaixi Luo
Дата:
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?

От
"Wes Vaske (wvaske)"
Дата:
?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?

От
Mark Kirkwood
Дата:
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