Re: Additional LWLOCK_STATS statistics

Поиск
Список
Период
Сортировка
От Jesper Pedersen
Тема Re: Additional LWLOCK_STATS statistics
Дата
Msg-id 55F99C65.4070209@redhat.com
обсуждение исходный текст
Ответ на Re: Additional LWLOCK_STATS statistics  (Andres Freund <andres@anarazel.de>)
Ответы Re: Additional LWLOCK_STATS statistics  (Jesper Pedersen <jesper.pedersen@redhat.com>)
Список pgsql-hackers
Hi,

On 09/16/2015 12:26 PM, Andres Freund wrote:
> On 2015-09-16 10:37:43 -0400, Jesper Pedersen wrote:
>>    #ifdef LWLOCK_STATS
>>        lwstats->spin_delay_count += SpinLockAcquire(&lock->mutex);
>> +
>> +     /*
>> +      * We scan the list of waiters from the back in order to find
>> +      * out how many of the same lock type are waiting for a lock.
>> +      * Similar types have the potential to be groupped together.
>> +      *
>
> Except for LW_WAIT_UNTIL_FREE there shouldn't be much in terms of
> grouping? Can't you instead iterate and count
> counter[waiter->lwWaitMode]++ or so?
>

The sample report (-c/-j 80) shows in the exclusive report that 
CLogControlLock has 79 in series, XidGenLock has 80 and ProcArrayLock 
only 7. For shared CLogControlLock has 63 and ProcArrayLock has 74 
(which is also its max queue size).

So, I think there is some value in keeping this information separate.

Best regards, Jesper




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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUFFER_LOCK_* synonyms
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: BUFFER_LOCK_* synonyms