Re: full_page_writes on SSD?

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: full_page_writes on SSD?
Дата
Msg-id 56559FE7.2050706@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: full_page_writes on SSD?  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On 11/24/2015 08:40 PM, John R Pierce wrote:
> On 11/24/2015 10:48 AM, Marcin Mańk wrote:
>> I saw this:
>> http://blog.pgaddict.com/posts/postgresql-on-ssd-4kb-or-8kB-pages
>>
>> It made me wonder: if SSDs have 4kB/8kB sectors, and we'd make the
>> Postgres page size equal to the SSD page size, do we still need
>> full_page_writes?
>
>
> an SSD's actual write block is much much larger than that. they
> emulate 512 or 4k sectors, but they are not actually written in
> sector order, rather new writes are accumulated in a buffer on the
> drive, then written out to a whole block, and a sector mapping table
> is maintained by the drive.

I don't see how that's related to full_page_writes?

It's true that SSDs optimize the writes in various ways, generally along
the lines you described, because they do work with "erase
blocks"(generally 256kB - 1MB chunks) and such.

But the internal structure of SSD has very little to do with FPW because
what matters is whether the on-drive write cache is volatile or not (SSD
can't really work without it).

What matters (when it comes to resiliency to torn pages) is the page
size at the OS level, because that's what's being handed over to the SSD.

Of course, there might be other benefits of further lowering page sizes
at the OS/database level (and AFAIK there are SSD drives that use pages
smaller than 4kB).

regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


В списке pgsql-general по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: full_page_writes on SSD?
Следующее
От: Albe Laurenz
Дата:
Сообщение: Re: Query failed: ERROR: character with byte sequence 0xc2 0x96 in encoding "UTF8" has no equivalent in encoding "WIN1250"