Re: Analysis of ganged WAL writes

Поиск
Список
Период
Сортировка
От Curtis Faith
Тема Re: Analysis of ganged WAL writes
Дата
Msg-id DMEEJMCDOJAKPPFACMPMGEFLCEAA.curtis@galtair.com
обсуждение исходный текст
Ответ на Re: Analysis of ganged WAL writes  (Hannu Krosing <hannu@tm.ee>)
Ответы Re: Analysis of ganged WAL writes  (Hannu Krosing <hannu@tm.ee>)
Список pgsql-hackers
> I may be missing something obvious, but I don't see a way to get more
> than 1 trx/process/revolution, as each previous transaction in that
> process must be written to disk before the next can start, and the only
> way it can be written to the disk is when the disk heads are on the
> right place and that happens exactly once per revolution.

Okay, consider the following scenario.

1) Process A commits when the platter is at 0 degrees.
2) There are enough XLog writes from other processes to fill 1/4 platter
rotation worth of log or 90 degrees. The SCSI drive writes the XLog commit
record and keeps writing other log entries as the head rotates.
3) Process A receives a confirmation of the write before the platter
rotates 60 degrees.
4) Process A continues and adds another commit before the platter rotates
to 90 degrees.

This should be very possible and more and more likely in the future as CPUs
get faster and faster relative to disks.

I'm not suggesting this would happen all the time, just that it's possible
and that an SMP machine with good CPUs and a fast I/O subsystem should be
able to keep the log writing at close to I/O bandwidth limits.

The case of bulk inserts is one where I would expect that for simple tables
we should be able to peg the disks given today's hardware and enough
inserting processes.

- Curtis



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: 7.2.3 patching done
Следующее
От: Tom Lane
Дата:
Сообщение: Where to call SetQuerySnapshot