Re: stored procedure stats in collector

Поиск
Список
Период
Сортировка
От Martin Pihlak
Тема Re: stored procedure stats in collector
Дата
Msg-id 482AD997.7070307@gmail.com
обсуждение исходный текст
Ответ на Re: stored procedure stats in collector  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
> What I think we should do about that is forget tracking getrusage()'s
> user/system/real time and just track elapsed time.  We have the
> technology to get that in a portable fashion (cf the well-proven
> instrument.c code).  Such a decision would also alleviate two of the
> biggest negatives of this patch, which are the runtime overhead and
> the extent to which it's going to bloat the pgstats file.
>

I find the utime/stime quite useful, compared with the actual time it
enables us to distinguish waiters (remote calls, sleeps, etc) from the
actual CPU hogs. The difference is also very visible for IO bound
functions. At least in our case it is a very useful tool for diagnosing
performance issues and the overhead is not really visible.

Perhaps the track_functions should just be set to none, or enabled selectively
(session, function guc, user guc) for the environments where getrusage()
is particularly expensive? Maybe a note in the docs that tracking is
potentially expensive, and should be used carefully in production env.

Regards,
Martin

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: libpq object hooks
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: libpq object hooks