Re: Some interesting results from tweaking spinlocks

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Some interesting results from tweaking spinlocks
Date: 2002-01-05 05:41:48
Message-ID: 200201050541.g055fmS21463@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-01-05 05:52:12 Re: Some interesting results from tweaking spinlocks
Previous Message Tom Lane 2002-01-05 05:34:57 Re: Some interesting results from tweaking spinlocks