Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-odbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group