Re: Btree runtime recovery. Stuck spins. - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Btree runtime recovery. Stuck spins.
Date
Msg-id 200102091812.NAA13636@candle.pha.pa.us
Whole thread Raw
In response to Re: Btree runtime recovery. Stuck spins.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Btree runtime recovery. Stuck spins.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> > Hm.  It was OK to use spinlocks to control buffer access when the max
> > delay was just the time to read or write one disk page.  But it sounds
> > like we've pushed the code way past what it was designed to do.  I think
> > this needs some careful thought, not just a quick hack like increasing
> > the timeout interval.
> 
> After thinking more about this, simply increasing S_MAX_BUSY is clearly
> NOT a good answer.  If you are under heavy load then processes that are
> spinning are making things worse, not better, because they are sucking
> CPU cycles that would be better spent on the processes that are holding
> the locks.

Our spinlocks don't go into an infinite test loop, right?  They back off
and retest at random intervals.

I can't imagine we don't have similar btree lock needs other places in
the code were a solution already exists.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Btree runtime recovery. Stuck spins.
Next
From: Bruce Momjian
Date:
Subject: Re: Open 7.1 items