Re: Some interesting results from tweaking spinlocks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Some interesting results from tweaking spinlocks
Дата
Msg-id 12679.1010257264@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Some interesting results from tweaking spinlocks  (Brent Verner <brent@rcfile.org>)
Ответы Re: Some interesting results from tweaking spinlocks
Список pgsql-hackers
Brent Verner <brent@rcfile.org> writes:
> I suspect using usleep() instead of select() might
> relieve the serialization.

A number of people have suggested that reducing the sleep interval would
improve matters.  I tried that just now, again on RedHat's 4-way box,
and was mildly astonished to find that it makes things worse.  The graph
below shows pgbench results for both the current code (10 millisec delay
using select()) and a 10-microsec delay using usleep(), with several
different SPINS_PER_DELAY values.  Test conditions are otherwise the
same as in my last message (in particular, LWLock patch version 2).

At any given SPINS_PER_DELAY, the 10msec sleep beats the 10usec sleep
handily.  I wonder if this indicates a problem with Linux'
implementation of usleep?

            regards, tom lane


Вложения

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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: RC1 time?
Следующее
От: Sean Chittenden
Дата:
Сообщение: Re: pgcryto strangeness...