Sampling profiler updated

Поиск
Список
Период
Сортировка
От Itagaki Takahiro
Тема Sampling profiler updated
Дата
Msg-id 20090714183127.946A.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответы Re: Sampling profiler updated  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Re: Sampling profiler updated  (Stefan Moeding <pgsql@moeding.net>)
Re: Sampling profiler updated  (Dimitri Fontaine <dfontaine@hi-media.com>)
Список pgsql-hackers
I updated Sampling profiler patch to be applied to HEAD cleanly.

Basic concept of the patch is same as DTrace probes:
Call pgstat_push_condition(condition) before a operation and call
pgstat_pop_condition() at the end of the operation. Those functions
should be light-weight because they only change a variable on shared
memory without any locks.

Stats collector process checks those shard variables periodically and
sums the status in collector's local memory. We cannot know exact
numbers of each operation, but can expect the sampling numbers reflect
the tendency of times spend in each operation. The sampling result
can be retrived with pg_profiles system view.


Of course the profiler could be implemented on the top of DTrace or
SystemTap, but it is not so easy if we try to avoid any performance
regressions and to provide the information by VIEW-like interface.
Also, this approach is platform-independent.


A new feature compared with previous patch is function
pgstat_register_condition(condition, name).
We can add user-defined conditions in extended modules.

Comments welcome.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Вложения

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Comments on automatic DML routing and explicit partitioning subcommands
Следующее
От: Tsutomu Yamada
Дата:
Сообщение: [PATCH] "could not reattach to shared memory" on Windows