> 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