pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: Anjan Dave <adave@vantage.com>
Cc: Dirk Lutzebäck <lutzeb@aeccom.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgreSQL.org, Neil Conway <neilc@samurai.com>
Subject: Re: Wierd context-switching issue on Xeon
Date: Tue, 20 Apr 2004 22:41:03 -0400
Message-ID: <1082515263.1558.214.camel@localhost.localdomain> (raw)
In-Reply-To: <200404200959.52813.josh@agliodbs.com>
References: <4BAFBB6B9CC46F41B2AD7D9F4BBAF78509814A@vt-pe2550-001.vantage.vantage.com>
	<200404200959.52813.josh@agliodbs.com>

I modified the code in s_lock.c to remove the spins

#define SPINS_PER_DELAY         1

and it doesn't exhibit the behaviour

This effectively changes the code to 


while(TAS(lock))
	select(10000); // 10ms

Can anyone explain why executing TAS 100 times would increase context
switches ?

Dave


On Tue, 2004-04-20 at 12:59, Josh Berkus wrote:
> Anjan,
> 
> > Quad 2.0GHz XEON with highest load we have seen on the applications, DB
> > performing great -
> 
> Can you run Tom's test?   It takes a particular pattern of data access to 
> reproduce the issue.
-- 
Dave Cramer
519 939 0336
ICQ # 14675561




view thread (77+ messages)  latest in thread

Message-ID: <1082515263.1558.214.camel@localhost.localdomain>
Permalink:  ../1082515263.1558.214.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1082515263.1558.214.camel@localhost.localdomain

 · 

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: pg@fastcrypt.com, josh@agliodbs.com, adave@vantage.com, lutzeb@aeccom.com, tgl@sss.pgh.pa.us, neilc@samurai.com
  Subject: Re: Wierd context-switching issue on Xeon
  In-Reply-To: <1082515263.1558.214.camel@localhost.localdomain>

* 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