Skip site navigation (1) Skip section navigation (2)

Re: Spinlock performance improvement proposal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "D(dot) Hageman" <dhageman(at)dracken(dot)com>
Cc: Alex Pilosov <alex(at)pilosoft(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Spinlock performance improvement proposal
Date: 2001-09-27 04:19:20
Message-ID: 15403.1001564360@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"D. Hageman" <dhageman(at)dracken(dot)com> writes:
> If you look at Myron Scott's post today you will see that it had other 
> advantages going for it (like auto-vacuum!) and disadvantages ... rogue 
> thread corruption (already debated today).

But note that Myron did a number of things that are (IMHO) orthogonal
to process-to-thread conversion, such as adding prepared statements,
a separate thread/process/whateveryoucallit for buffer writing, ditto
for vacuuming, etc.  I think his results cannot be taken as indicative
of the benefits of threads per se --- these other things could be
implemented in a pure process model too, and we have no data with which
to estimate which change bought how much.

Threading certainly should reduce the context switch time, but this
comes at the price of increased overhead within each context (since
access to thread-local variables is not free).  It's by no means
obvious that there's a net win there.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tatsuo IshiiDate: 2001-09-27 05:22:07
Subject: multibyte performance
Previous:From: Alex PilosovDate: 2001-09-27 04:08:51
Subject: Re: Spinlock performance improvement proposal

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group