Re: Spinlock performance improvement proposal

From: Myron Scott <mscott(at)sacadia(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Spinlock performance improvement proposal
Date: 2001-09-27 05:24:29
Message-ID: Pine.GSO.4.10.10109262146500.1111-100000@goldengate.kojoworldwide.com.
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers



> But note that Myron did a number of things that are (IMHO) orthogonal

yes, I did :)

> 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.
>

If you are comparing just process vs. thread, I really don't think I
gained much for performance and ended up with some pretty unmanageable
code.

The one thing that led to most of the gains was scheduling all the writes
to one thread which, as noted by Tom, you could do on the process model.
Besides, Most of the advantage in doing this was taken away with the
addition of WAL in 7.1.

The other real gain that I saw with threading was limiting the number of
open files but
that led me to alter much of the file manager in order to synchronize
access to the files which probably slowed things a bit.

To be honest, I don't think I, personally,
would try this again. I went pretty far off
the beaten path with this thing. It works well for what I am doing
( a limited number of SQL statements run many times over ) but there
probably was a better way. I'm thinking now that I should have tried to
add a CORBA interface for connections. I would have been able to
accomplish my original goals without creating a deadend for myself.

Thanks all for a great project,

Myron
mscott(at)sacadia(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christof Petig 2001-09-27 07:26:12 Re: [PATCHES] Problem with setlocale (found in libecpg) [accessing a
Previous Message Tatsuo Ishii 2001-09-27 05:22:07 multibyte performance