From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: pg@fastcrypt.com, Robert Creager <Robert_Creager@LogicalChaos.org>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Dirk_Lutzebäck <lutzeb@aeccom.com>
Cc: ohp@pyrenet.fr, Joe Conway <mail@joeconway.com>
Cc: scott.marlowe <scott.marlowe@ihs.com>
Cc: pgsql-performance@postgresql.org, Neil Conway <neilc@samurai.com>
Subject: Re: Wierd context-switching issue on Xeon
Date: Wed, 19 May 2004 22:41:26 -0400
Message-ID: <24373.1085020886@sss.pgh.pa.us> (raw)
In-Reply-To: <200405200120.i4K1KKm06350@candle.pha.pa.us>
References: <200405200120.i4K1KKm06350@candle.pha.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Did we ever come to a conclusion about excessive SMP context switching
> under load?
Yeah: it's bad.
Oh, you wanted a fix? That seems harder :-(. AFAICS we need a redesign
that causes less load on the BufMgrLock. However, the traditional
solution to too-much-contention-for-a-lock is to break up the locked
data structure into finer-grained units, which means *more* lock
operations in total. Normally you expect that the finer-grained lock
units will mean less contention. But given that the issue here seems to
be trading physical ownership of the lock's cache line back and forth,
I'm afraid that the traditional approach would actually make things
worse. The SMP issue seems to be not with whether there is
instantaneous contention for the locked datastructure, but with the cost
of making it possible for processor B to acquire a lock recently held by
processor A.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, Robert_Creager@LogicalChaos.org, josh@agliodbs.com, lutzeb@aeccom.com, mail@joeconway.com, scott.marlowe@ihs.com, neilc@samurai.com
Subject: Re: Wierd context-switching issue on Xeon
In-Reply-To: <24373.1085020886@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox