Re: Read-ahead and parallelism in redo recovery

Поиск
Список
Период
Сортировка
От Florian Weimer
Тема Re: Read-ahead and parallelism in redo recovery
Дата
Msg-id 82ablj4zw1.fsf@mid.bfk.de
обсуждение исходный текст
Ответ на Read-ahead and parallelism in redo recovery  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Ответы Re: Read-ahead and parallelism in redo recovery
Список pgsql-hackers
* Pavan Deolasee:

> The current redo-recovery is a single threaded, synchronous process.
> The XLOG is read sequentially, each log record is examined and
> replayed if required. This requires reading disk blocks in the
> shared buffers and applying changes to the buffer. The reading
> happens synchronously and that would usually make the redo process
> very slow.

Are you sure that it's actually slow for that reason?  Sequential I/O
on the log is typically quite fast, and if the pages dirtied since the
last checkpoint fit into the cache (shared buffers or OS cache), even
that part of recovery does not result in lots of random I/O (with 8.3
and full page writes active; this is a relatively recent change).

In the end, I wouldn't be surprised if for most loads, cache warming
effects dominated recovery times, at least when the machine is not
starved on RAM.

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Why we panic in pglz_decompress
Следующее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: Read-ahead and parallelism in redo recovery