pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Mark Wong <markw@osdl.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: neilc@samurai.com
Cc: pgsql-performance@postgresql.org
Subject: Re: futex results with dbt-3
Date: Fri, 22 Oct 2004 22:55:38 +0200
Message-ID: <417973CA.1090807@colorfullife.com> (raw)
In-Reply-To: <20041021065458.A5580@osdl.org>
References: <417221B5.1050704@colorfullife.com>
	<20151.1098222733@sss.pgh.pa.us>
	<417697A5.1050600@colorfullife.com>
	<7178.1098292535@sss.pgh.pa.us>
	<4176A2C1.3070205@colorfullife.com>
	<20041020150528.B7838@osdl.org>
	<41774D11.1030906@colorfullife.com>
	<20041021065458.A5580@osdl.org>

Mark Wong wrote:

>Pretty, simple.  One to load the database, and 1 to query it.  I'll 
>attach them.
>
>  
>
I've tested it on my dual-cpu computer:
- it works, both cpus run within the postmaster. It seems something your 
gentoo setup is broken.
- the number of context switch is down slightly, but not significantly: 
The glibc implementation is more or less identical to the implementation 
right now in lwlock.c: a spinlock that protects a few variables that are 
used to implement the actual mutex, several wait queues: one for 
spinlock busy, one or two for the actual mutex code.

Around 25% of the context switches are from spinlock collisions, the 
rest are from actual mutex collisions. It might be possible to get rid 
of the spinlock collisions by writing a special, futex based semaphore 
function that only supports exclusive access [like sem_wait/sem_post], 
but I don't think that it's worth the effort: 75% of the context 
switches would remain.
What's needed is a buffer manager that can do lookups without a global lock.

--
    Manfred



view thread (24+ messages)  latest in thread

Message-ID: <417973CA.1090807@colorfullife.com>
Permalink:  ../417973CA.1090807@colorfullife.com/
Also on:    postgresql.org/message-id/417973CA.1090807@colorfullife.com

 · 

reply

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: manfred@colorfullife.com, markw@osdl.org, tgl@sss.pgh.pa.us, neilc@samurai.com
  Subject: Re: futex results with dbt-3
  In-Reply-To: <417973CA.1090807@colorfullife.com>

* 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