Re: Spinlock performance improvement proposal

Поиск
Список
Период
Сортировка
От Myron Scott
Тема Re: Spinlock performance improvement proposal
Дата
Msg-id Pine.GSO.4.10.10109262146500.1111-100000@goldengate.kojoworldwide.com.
обсуждение исходный текст
Ответ на Re: Spinlock performance improvement proposal  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@sacadia.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: multibyte performance
Следующее
От: Christof Petig
Дата:
Сообщение: Re: [PATCHES] Problem with setlocale (found in libecpg) [accessing a