Re: Adjustment of spinlock sleep delays

Поиск
Список
Период
Сортировка
От Mendola Gaetano
Тема Re: Adjustment of spinlock sleep delays
Дата
Msg-id 000e01c35c0d$5b4f4dc0$32add6c2@mm.eutelsat.org
обсуждение исходный текст
Ответ на Adjustment of spinlock sleep delays  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Adjustment of spinlock sleep delays  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
From: "Tom Lane" <tgl@sss.pgh.pa.us>

> To forestall this scenario, I'm thinking of introducing backoff into the
> sleep intervals --- that is, after first failure to get the spinlock,
> sleep 10 msec; after the second, sleep 20 msec, then 40, etc, with a
> maximum sleep time of maybe a second.  The number of iterations would be
> reduced so that we still time out after a minute's total delay.


What about use the same algorithm used in ethernet when a collision is
detected?

When a collision occurs: 
 1) Stop sending. 2) Wait for some random amount of time between 0-T seconds 3) Try again. 4) If collision occurs
again,increase T using an algorithm, go to         Step 2. 
 
algorithm:

T = rand ( 2n -1 ) * 51.2 ms

where n- number of collisions 



Regards
Gaetano Mendola




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

Предыдущее
От: Andreas
Дата:
Сообщение: Re: "truncate all"?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: DROP TYPE/DROP DOMAIN