Re: Excessive (and slow) fsync() within single transaction

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: Excessive (and slow) fsync() within single transaction
Дата
Msg-id 4B1F03F4.60004@2ndquadrant.com
обсуждение исходный текст
Ответ на Excessive (and slow) fsync() within single transaction  (Stephen Tyler <stephen@stephen-tyler.com>)
Ответы Re: Excessive (and slow) fsync() within single transaction  (Stephen Tyler <stephen@stephen-tyler.com>)
Re: Excessive (and slow) fsync() within single transaction  (Stephen Tyler <stephen@stephen-tyler.com>)
Список pgsql-general
Stephen Tyler wrote:
> So firstly, why are there so many calls to fsync()?
Every time a transaction commits, you get a fsync to the WAL file.
Then, during the periodic database checkpoints, you get more fsync'd
writes.  The latter are more likely to be your problem.

You should turn on log_checkpoint in the postgresql.conf and confirm the
slowdowns are happening around the same time as the checkpoint report
gets written to the log files.  Presuming that turns out to be the case,
you'll want to follow the suggestions at
http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server to improve
the behavior, and you can get a lot more background about what's
happening at
http://www.westnet.com/~gsmith/content/postgresql/chkp-bgw-83.htm

We just went through one of these last week with someone else, you might
find the troubleshooting process and surrounding discussion interesting
reading:

http://archives.postgresql.org/pgsql-performance/2009-12/msg00033.php

One useful later stage in troubleshooting problems in this area is to
reduce the amount of caching done by the operating system, so that there
aren't as many blocks backed up when the fsync calls happen.  I'm not
sure how to do this on OS X though.

--
Greg Smith    2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com  www.2ndQuadrant.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Linking pg_config (postgres 8.4 in SCO 5.0.7)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Installing PL/pgSQL by default