Re: Postgresql and xeon. - Mailing list pgsql-performance

From Tom Lane
Subject Re: Postgresql and xeon.
Date
Msg-id 24603.1117473308@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgresql and xeon.  ("Steinar H. Gunderson" <sgunderson@bigfoot.com>)
List pgsql-performance
"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

pgsql-performance by date:

Previous
From: Tobias Brox
Date:
Subject: Re: timestamp indexing
Next
From: Tom Lane
Date:
Subject: Re: timestamp indexing