Re: Adjustment of spinlock sleep delays

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adjustment of spinlock sleep delays
Date: 2003-08-05 21:13:43
Message-ID: 1060118022.19065.1.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> To forestall this scenario, I'm thinking of introducing backoff into the
> sleep intervals --- that is, after first failure to get the spinlock,
> sleep 10 msec; after the second, sleep 20 msec, then 40, etc, with a
> maximum sleep time of maybe a second. The number of iterations would be
> reduced so that we still time out after a minute's total delay.

After the first few sleeps should it add a random() element to the delay
time?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-08-05 22:00:54 Re: logging stuff
Previous Message Mike Mascari 2003-08-05 20:55:01 Re: Adjustment of spinlock sleep delays