Re: Re: [PERFORM] Disable-spinlocks while compiling postgres 9.1 for ARM Cortex A8

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Jayashankar K B <Jayashankar(dot)KB(at)lnties(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Re: [PERFORM] Disable-spinlocks while compiling postgres 9.1 for ARM Cortex A8
Date: 2012-02-27 14:39:23
Message-ID: CAHyXU0xZpzUJjTzBUOUbJHgMboH6GR50kmtEYzZopXUb1C88uQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On Sun, Feb 26, 2012 at 6:16 AM, Jayashankar K B
<Jayashankar(dot)KB(at)lnties(dot)com> wrote:
> Ok. I did a manual patch and it Postgres 9.1.1 compiled for me without using the --disable-spinlocks option.
> Thanks a lot for the patch. :)
> By the way, could you please point me to the explanation on the significance of spinlocks for Postgres?

spinlocks are used all over the place to synchronize access to shared
data structures (see here: http://en.wikipedia.org/wiki/Spinlock also
see here: http://rhaas.blogspot.com/2011/01/locking-in-postgresql.html)
you can awkwardly implement them in high level languages like C but
typically there are hardware primitives that are much faster and
better to use.

very generally speaking, spinlocks are a better than semaphores when
the lock duration is very short, contention isn't terrible, and the
time taken to acquire the lock matters.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2012-02-27 15:11:27 Re: problem setting up
Previous Message hamann.w 2012-02-27 14:21:56 problem setting up

Browse pgsql-performance by date

  From Date Subject
Next Message Shaun Thomas 2012-02-27 14:45:53 Re: Very long deletion time on a 200 GB database
Previous Message Wales Wang 2012-02-27 12:46:38 回复: [PERFORM] PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?