From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steinar H. Gunderson <sgunderson@bigfoot.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgresql and xeon.
Date: Mon, 30 May 2005 13:15:08 -0400
Message-ID: <24603.1117473308@sss.pgh.pa.us> (raw)
In-Reply-To: <20050530165447.GA9708@uio.no>
References: <F7B73864DD39FA40B6C56B3CE0D4D1CB634479@asdc003.abovesecurite.lan>
<200505300919.40827.josh@agliodbs.com>
<20050530165447.GA9708@uio.no>
"Steinar H. Gunderson" <sgunderson@bigfoot.com> writes:
> I must admit I still haven't really understood it -- I know that it appears
> on multiple operating systems, on multiple architectures, but most with Xeon
> CPUs, and that it's probably related to the poor memory bandwidth between the
> CPUs, but that's about it. I've read the threads I could find on the list
> archives, but I've yet to see somebody pinpoint exactly what in PostgreSQL is
> causing this.
The problem appears to be that heavy contention for a spinlock is
extremely expensive on multiprocessor Xeons --- apparently, the CPUs
waste tremendous amounts of time passing around exclusive ownership
of the memory cache line containing the spinlock. While any SMP system
is likely to have some issues here, the Xeons seem to be particularly
bad at it.
In the case that was discussed extensively last spring, the lock that
was causing the problem was the BufMgrLock. Since 8.0 we've rewritten
the buffer manager in hopes of reducing contention, but I don't know
if the problem is really gone or not. The buffer manager is hardly the
only place with the potential for heavy contention...
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, sgunderson@bigfoot.com
Subject: Re: Postgresql and xeon.
In-Reply-To: <24603.1117473308@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