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

From Bruce Momjian
Subject Re: Some interesting results from tweaking spinlocks
Date
Msg-id 200201050541.g055fmS21463@candle.pha.pa.us
Whole thread Raw
In response to Re: Some interesting results from tweaking spinlocks  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Some interesting results from tweaking spinlocks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> 2. In this example, almost one in ten LWLockAcquire calls results in
> blocking (calling IpcSemaphoreLock).  That seems like a lot.  I was
> seeing much better results on a uniprocessor under essentially the
> same test: one in a thousand LWLockAcquire calls blocked, not one in
> ten.  What's causing that discrepancy?
> 
> 3. The amount of spinlock-level contention seems too high too.  We
> are calling s_lock about one out of every hundred LWLockAcquire or
> LWLockRelease calls; the equivalent figure from a uniprocessor profile
> is one in five thousand.  Given the narrow window in which the spinlock
> is held, how can the contention rate be so high?
> 
> Anyone see an explanation for these last two observations?

Isn't there tons more lock contention on an SMP machine.  I don't see
the surprise.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Some interesting results from tweaking spinlocks
Next
From: Bruce Momjian
Date:
Subject: Re: Some interesting results from tweaking spinlocks