Re: LWLock contention: I think I understand the problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Jeffrey W(dot) Baker" <jwbaker(at)acm(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: LWLock contention: I think I understand the problem
Date: 2001-12-30 02:42:00
Message-ID: 27935.1009680120@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-odbc

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> OK, here are the results on BSD/OS 4.2 on a 2-cpu system. The first is
> before the patch, the second after. Both average 14tps, so the patch
> has no negative effect on my system. Of course, it has no positive
> effect either. :-)

I am also having a hard time measuring any difference using pgbench.
However, pgbench is almost entirely I/O bound on my hardware (CPU is
typically 70-80% idle) so this is not very surprising.

I can confirm that the patch accomplishes the intended goal of reducing
context swaps. Using pgbench with 64 clients, a profile of the old code
showed about 7% of LWLockAcquire calls blocking (invoking
IpcSemaphoreLock). A profile of the new code shows 0.1% of the calls
blocking.

I suspect that we need something less I/O-bound than pgbench to really
tell whether this patch is worthwhile or not. Jeffrey, what are you
seeing in your application?

And btw, what are you using to count context swaps?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-12-30 03:20:44 Re: Thoughts on the location of configuration files
Previous Message Bruce Momjian 2001-12-30 02:38:44 Re: Thoughts on the location of configuration files

Browse pgsql-odbc by date

  From Date Subject
Next Message Tatsuo Ishii 2001-12-30 07:53:09 Re: LWLock contention: I think I understand the problem
Previous Message Bruce Momjian 2001-12-30 02:30:23 Re: LWLock contention: I think I understand the problem