Re: XLogFlush invoked about twice as much after 9.2 group commit enhancement

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: XLogFlush invoked about twice as much after 9.2 group commit enhancement
Дата
Msg-id CAMkU=1xrKHKr6-SjcU7DoTbp1wY3XOj5dV4pO7n9rR+JQ-htig@mail.gmail.com
обсуждение исходный текст
Ответ на XLogFlush invoked about twice as much after 9.2 group commit enhancement  (Amit Langote <amitlangote09@gmail.com>)
Ответы Re: XLogFlush invoked about twice as much after 9.2 group commit enhancement
Re: XLogFlush invoked about twice as much after 9.2 group commit enhancement
Список pgsql-hackers
On Tue, May 7, 2013 at 2:20 AM, Amit Langote <amitlangote09@gmail.com> wrote:
Hello,

I have been trying to understand how group commit implementation works
the way it does after 9.2 group commit enhancement patch
(9b38d46d9f5517dab67dda1dd0459683fc9cda9f on REL9_2_STABLE). I admit
it's a pretty old commit though I seek some clarification as to how it
provides the performance gain as it does. Also, I have observed some
behavior in this regard that I could not understand.

Profiling results show that XLogFlush is called about twice as much
after this patch while for XLogWrite count remains about same as
before.

Are you sure you properly cleared out the stats between profiling sessions?  Also, XLogFlush gets called by background processes like autovac, checkpointer and bgwriter, in addition to being called by committing processes.  If one profiled session contained a checkpoint and other did not, or one just idled a lot longer between when the benchmark finished and when you shutdown the server, perhaps that explains it.

Anyway, I don't see this behavior change when turning on wal_debug and looking in the logfiles for 'xlog flush request' messages.


I used "pgbench -c 32 -t 1000 pgbench" in both cases with TPS result
(after applying the patch) not being significantly different (as in
not twice as much on my system).

1000 is a very small number of transactions to run a benchmark for.  What was the duration?

What were the actual TPS numbers?  Does your hardware honor fsyncs?

Cheers,

Jeff

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: issues with dropped columns in plpgsql code again
Следующее
От: Szymon Guz
Дата:
Сообщение: Re: issues with dropped columns in plpgsql code again