Re: Procedural Languages

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Procedural Languages
Дата
Msg-id 4FD196FB.9070407@ringerc.id.au
обсуждение исходный текст
Ответ на Re: Procedural Languages  (Zenaan Harkness <zen@freedbms.net>)
Список pgsql-general
On 06/08/2012 08:40 AM, Zenaan Harkness wrote:
Will someone please point me to a URL re PG's Java backend cost.. been
googling but no joy so far..
Benchmark it. It depends on your hardware, your workload, your JVM version, your JVM vendor, your Java configuration, whether you have pljava in your  shared_preload_libraries, etc.
I'd like find out how often the JVM starts up eg based on queries or
sessions or connections or what... didn't know it was potentially
woeful. In particular re "Because Pg doesn't re-use backends, there's
a huge amount of JVM startup and shutdown cost."

"Huge" is relative; I'm just saying that it's a big cost relative to PL/PgSQL. It may well be overstating the case.

Benchmark and see. In general, PL/Java should be cheaper if you have longer-lived backends that do lots of work, and more expensive if you have lots of short lived backends that run just one or two simple PL/Java procedures then terminate.

Most PL/Java users are likely to be operating with connection pools where connections are heavily re-used. The overhead of PL/Java may be quite low in this case. Again, benchmark and see, but importantly benchmark something comparable to your workload. There's no point running a benchmark that's nothing like your workload and drawing conclusions about your workload from it.

--
Craig Ringer

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Question about load balance
Следующее
От: "Marc Watson"
Дата:
Сообщение: Re: Postgres 9.2 beta2 one-click installer on windows