Re: [PATCH] add --throttle option to pgbench

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: [PATCH] add --throttle option to pgbench
Дата
Msg-id CAMkU=1xEW69gP3RYE37iXgh7q4imTBA5Yq0fdu1VV6hHQkzgrg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] add --throttle option to pgbench  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] add --throttle option to pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Re: [PATCH] add --throttle option to pgbench [patch 2]  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On Mon, Apr 29, 2013 at 8:27 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Fabien COELHO <coelho@cri.ensmp.fr> writes:
> Please find attached a small patch to add a throttling capability to
> pgbench, that is pgbench aims at a given client transaction rate instead
> of maximizing the load. The throttling relies on Poisson-distributed
> delays inserted after each transaction.

I'm having a hard time understanding the use-case for this feature.
Surely, if pgbench is throttling its transaction rate, you're going
to just end up measuring the throttle rate.


While I don't understand the part about his laptop battery, I think that there is a good use case for this.  If you are looking at latency distributions or spikes, you probably want to see what they are like with a load which is like the one you expect having, not the load which is the highest possible.   Although for this use case you would almost surely be using custom transaction files, not default ones, so I think you could just use \sleep.  However, I don't know if there is an easy way to dynamically adjust the sleep value by subtracting off the overhead time and randomizing it a bit, like is done here.    

It does seem to me that we should Poissonize the throttle time, then subtract the average overhead, rather than Poissonizing the difference.

Cheers,

Jeff

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken