Re: Proposal of tunable fix for scalability of 8.4

From: Simon Riggs
Subject: Re: Proposal of tunable fix for scalability of 8.4
Date: ,
Msg-id: 1237417616.3953.318.camel@ebony.2ndQuadrant
(view: Whole thread, Raw)
In response to: Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane)
List: pgsql-performance

Tree view

Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
 Re: Proposal of tunable fix for scalability of 8.4  ("Kevin Grittner", )
  Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
   Re: Proposal of tunable fix for scalability of 8.4  ("Kevin Grittner", )
  Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane, )
   Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
    Re: Proposal of tunable fix for scalability of 8.4  (Simon Riggs, )
     Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
     Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
      Re: Proposal of tunable fix for scalability of 8.4  (Simon Riggs, )
       Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
        Re: Proposal of tunable fix for scalability of 8.4  (Simon Riggs, )
        Re: Proposal of tunable fix for scalability of 8.4  (Gregory Stark, )
         Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
          Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
  Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
   Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane, )
    Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
     Re: Proposal of tunable fix for scalability of 8.4  (decibel, )
      Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
       Re: Proposal of tunable fix for scalability of 8.4  (Josh Berkus, )
    Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
     Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
      Re: Proposal of tunable fix for scalability of 8.4  ("Kevin Grittner", )
      Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
       Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
        Re: Proposal of tunable fix for scalability of 8.4  (Gregory Stark, )
         Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
          Re: Proposal of tunable fix for scalability of 8.4  (Gregory Stark, )
         Re: Proposal of tunable fix for scalability of 8.4  (decibel, )
        Re: Proposal of tunable fix for scalability of 8.4  (Gregory Stark, )
        Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
         Re: Proposal of tunable fix for scalability of 8.4  ("Kevin Grittner", )
          Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
           Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
         Re: Proposal of tunable fix for scalability of 8.4  ("Kevin Grittner", )
         Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
          Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
           Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
            Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
          Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
           Re: Proposal of tunable fix for scalability of 8.4  (decibel, )
            Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
             Re: Proposal of tunable fix for scalability of 8.4  (Gregory Stark, )
              Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
      Re: Proposal of tunable fix for scalability of 8.4  (Greg Smith, )
   Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
    Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
    Re: Proposal of tunable fix for scalability of 8.4  (Greg Smith, )
     Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
      Re: Proposal of tunable fix for scalability of 8.4  (Robert Haas, )
       Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane, )
        Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
        Re: Proposal of tunable fix for scalability of 8.4  ("Kevin Grittner", )
         Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
         Re: Proposal of tunable fix for scalability of 8.4  (, )
          Re: Proposal of tunable fix for scalability of 8.4  ("Kevin Grittner", )
           Re: Proposal of tunable fix for scalability of 8.4  ("Kevin Grittner", )
            Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
        Re: Proposal of tunable fix for scalability of 8.4  (Heikki Linnakangas, )
         Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane, )
          Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
          Re: Proposal of tunable fix for scalability of 8.4  (Simon Riggs, )
         Re: Proposal of tunable fix for scalability of 8.4  (Matthew Wakeling, )
          Re: Proposal of tunable fix for scalability of 8.4  (Simon Riggs, )
           Re: Proposal of tunable fix for scalability of 8.4  (Matthew Wakeling, )
            Re: Proposal of tunable fix for scalability of 8.4  (Simon Riggs, )
             Re: Proposal of tunable fix for scalability of 8.4  (Matthew Wakeling, )
             Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
              Re: Proposal of tunable fix for scalability of 8.4  (Matthew Wakeling, )
               Re: Proposal of tunable fix for scalability of 8.4  (Simon Riggs, )
           Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane, )
            Re: Proposal of tunable fix for scalability of 8.4  (Simon Riggs, )
           Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
            Re: Proposal of tunable fix for scalability of 8.4  (Matthew Wakeling, )
             Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane, )
             Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
             Re: Proposal of tunable fix for scalability of 8.4  (Simon Riggs, )
          Re: Proposal of tunable fix for scalability of 8.4  (Heikki Linnakangas, )
           Re: Proposal of tunable fix for scalability of 8.4  (Matthew Wakeling, )
       Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
        Re: Proposal of tunable fix for scalability of 8.4  (Robert Haas, )
         Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
          Re: Proposal of tunable fix for scalability of 8.4  (Robert Haas, )
           Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
            Re: Proposal of tunable fix for scalability of 8.4  (Robert Haas, )
             Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
              Re: Proposal of tunable fix for scalability of 8.4  (Alvaro Herrera, )
               Re: Proposal of tunable fix for scalability of 8.4  (Alvaro Herrera, )
                Re: Proposal of tunable fix for scalability of 8.4  (Alvaro Herrera, )
                 Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
                  Re: Proposal of tunable fix for scalability of 8.4  (Robert Haas, )
                   Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
           Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
         Re: Proposal of tunable fix for scalability of 8.4  (Bruce Momjian, )
          Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
           Re: Proposal of tunable fix for scalability of 8.4  (Bruce Momjian, )
         Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
      Re: Proposal of tunable fix for scalability of 8.4  (Greg Smith, )
     8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
      Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Gregory Stark, )
      Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Gregory Stark, )
       Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Alan Stange, )
        Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane, )
         Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Gregory Stark, )
          Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane, )
           Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Robert Haas, )
            Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Gregory Stark, )
            Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane, )
           Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Bruce Momjian, )
            Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Bruce Momjian, )
      Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4  (Greg Smith, )
   Re: Proposal of tunable fix for scalability of 8.4  ("Kevin Grittner", )
    Re: Proposal of tunable fix for scalability of 8.4  (Grzegorz Jaśkiewicz, )
     Re: Proposal of tunable fix for scalability of 8.4  ("Kevin Grittner", )
      Re: Proposal of tunable fix for scalability of 8.4  (Ron, )
     Re: Proposal of tunable fix for scalability of 8.4  (Gregory Stark, )
      Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
    Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
     Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane, )
      Re: Proposal of tunable fix for scalability of 8.4  (Alvaro Herrera, )
       Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
        Re: Proposal of tunable fix for scalability of 8.4  (decibel, )
      Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
    Re: Proposal of tunable fix for scalability of 8.4  (Tom Lane, )
     Re: Proposal of tunable fix for scalability of 8.4  (Scott Carey, )
    Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )
 Re: Proposal of tunable fix for scalability of 8.4  (Simon Riggs, )
  Re: Proposal of tunable fix for scalability of 8.4  ("Jignesh K. Shah", )

On Wed, 2009-03-18 at 16:26 -0400, Tom Lane wrote:
> Simon Riggs <> writes:
> > On Mon, 2009-03-16 at 16:26 +0000, Matthew Wakeling wrote:
> >> One possibility would be for the locks to alternate between exclusive
> >> and
> >> shared - that is:
> >>
> >> 1. Take a snapshot of all shared waits, and grant them all -
> >> thundering
> >> herd style.
> >> 2. Wait until ALL of them have finished, granting no more.
> >> 3. Take a snapshot of all exclusive waits, and grant them all, one by
> >> one.
> >> 4. Wait until all of them have been finished, granting no more.
> >> 5. Back to (1)
>
> > I agree with that, apart from the "granting no more" bit.
>
> > Currently we queue up exclusive locks, but there is no need to since for
> > ProcArrayLock commits are all changing different data.
>
> > The most useful behaviour is just to have two modes:
> > * exclusive-lock held - all other x locks welcome, s locks queue
> > * shared-lock held - all other s locks welcome, x locks queue
>
> My goodness, it seems people have forgotten about the "lightweight"
> part of the LWLock design.

"Lightweight" is only useful if it fits purpose. If the LWlock design
doesn't fit all cases, especially with critical lock types, then we can
have special cases. We have both spinlocks and LWlocks, plus we split
hash tables into multiple lock partitions. If we have 3 types of
lightweight locking, why not consider having 4?

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support



pgsql-performance by date:

From: Simon Riggs
Date:
Subject: Re: Proposal of tunable fix for scalability of 8.4
From: Oleg Bartunov
Date:
Subject: Re: Extremely slow intarray index creation and inserts.