Re: Proposal for 9.1: WAL streaming from WAL buffers

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Proposal for 9.1: WAL streaming from WAL buffers
Дата
Msg-id AANLkTilSUYuMcUzhC3doLBpdN5XSYlDA7_V3MjOMTr7C@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal for 9.1: WAL streaming from WAL buffers  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Proposal for 9.1: WAL streaming from WAL buffers  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Proposal for 9.1: WAL streaming from WAL buffers  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Proposal for 9.1: WAL streaming from WAL buffers  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Jun 11, 2010 at 11:47 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
>> hmm not sure that is what fujii tried to say - I think his point was
>> that in the original case we would have serialized all the operations
>> (first write+sync on the master, network afterwards and write+sync on
>> the slave) and now we could try parallelizing by sending the wal before
>> we have synced locally.
>
> Well, we're already not waiting for fsync, which is the slowest part.

No, currently walsender waits for fsync.

Walsender tries to send WAL up to xlogctl->LogwrtResult.Write. OTOH,
xlogctl->LogwrtResult.Write is updated after XLogWrite() performs fsync.
As the result, walsender cannot send WAL not fsynced yet. We should
update xlogctl->LogwrtResult.Write before XLogWrite() performs fsync
for 9.0?

But that change would cause the problem that Robert pointed out.
http://archives.postgresql.org/pgsql-hackers/2010-06/msg00670.php

> If there's a performance problem, it may be because FADVISE_DONTNEED
> disables kernel buffering so that we're forced to actually read the data
> back from disk before sending it on down the wire.

Currently, if max_wal_senders > 0, POSIX_FADV_DONTNEED is not used for
WAL files at all.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Proposal for 9.1: WAL streaming from WAL buffers
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Proposal for 9.1: WAL streaming from WAL buffers