Re: Some interesting results from tweaking spinlocks - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Some interesting results from tweaking spinlocks
Date
Msg-id 12679.1010257264@sss.pgh.pa.us
Whole thread Raw
In response to Re: Some interesting results from tweaking spinlocks  (Brent Verner <brent@rcfile.org>)
Responses Re: Some interesting results from tweaking spinlocks  (Brent Verner <brent@rcfile.org>)
List 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


Attachment

pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: RC1 time?
Next
From: Sean Chittenden
Date:
Subject: Re: pgcryto strangeness...