Re: pgbench throttling latency limit

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: pgbench throttling latency limit
Дата
Msg-id alpine.DEB.2.10.1409101637540.306@sto
обсуждение исходный текст
Ответ на Re: pgbench throttling latency limit  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: pgbench throttling latency limit  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Re: pgbench throttling latency limit  (Gregory Smith <gregsmithpgsql@gmail.com>)
Список pgsql-hackers
Hello Heikki,

> I looked closer at the this, and per Jan's comments, realized that we don't 
> log the lag time in the per-transaction log file. I think that's a serious 
> omission; when --rate is used, the schedule lag time is important information 
> to make sense of the result. I think we have to apply the attached patch, and 
> backpatch to 9.4. (The documentation on the log file format needs updating)

Indeed. I think that people do not like it to change. I remember that I 
suggested to change timestamps to "xxxx.yyyyyy" instead of the unreadable 
"xxxx yyy", and be told not to, because some people have tool which 
process the output so the format MUST NOT CHANGE. So my behavior is not to 
avoid touching anything in this area.

I'm fine if you do it, though:-) However I have not time to have a precise 
look at your patch to cross-check it before Friday.

> Also, this is bizarre:
>
>> int64 wait = (int64) (throttle_delay *
>>   1.00055271703 * -log(getrand(thread, 1, 10000) / 10000.0));
>
> We're using getrand() to generate a uniformly distributed random value 
> between 1 and 10000, and then convert it to a double between 0.0 and 1.0.

The reason for this conversion is to have randomness but to still avoid 
going to extreme multiplier values. The idea is to avoid a very large 
multiplier which would generate (even if it is not often) a 0 tps when 100 
tps is required. The 10000 granularity is basically random but the 
multiplier stays bounded (max 9.2, so the minimum possible tps would be 
around 11 for a target of 100 tps, bar issues from the database for 
processing the transactions).

So although this feature can be discussed and amended, it is fully 
voluntary. I think that it make sense so I would prefer to keep it as is. 
Maybe the comments could be update to be clearer.

-- 
Fabien.



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

Предыдущее
От: Mitsumasa KONDO
Дата:
Сообщение: Re: pgbench throttling latency limit
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Spinlocks and compiler/memory barriers