From: | thomas at tada(dot)se (Thomas Hallgren) |
---|---|
To: | |
Subject: | [Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process? |
Date: | 2014-04-13 14:47:54 |
Message-ID: | 534AA39A.4010906@tada.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
Interesting. What does your call into PL/Java (i.e. the function) look
like? How often do you call it (I assume just once)?
- thomas
On 2014-04-13 13:16, MauMau wrote:
> Hello all,
>
> it seems most likely that I will fail to convince my colleagues to use
> PL/Java. The performance was not as good as I expected compared to
> running Java functions in a process different from postgres. On RHEL6
> with PostgreSQL 9.2.8, I got the following results when I ran 10000
> UPDATE statements in a single transaction, excluding the time of BEGIN
> and COMMIT:
>
> * PL/pgSQL: 20 seconds
> * PL/Java: 22 seconds (see the attached BatchPL.java for processing)
> * Standalone client running on the same server as the database server:
> 23 seconds (see Batch.java, which does the same job as BatchPL.java)
>
> I avoided the influence of I/O by setting:
>
> wal_buffers = 16MB
> checkpoint_segments = 100
> checkpoint_timeout = 1h
>
> So I couldn't insist that PL/Java is required to greatly reduce the
> overhead of interprocess communication and process context switches.
> Any ideas?
>
> Regards
> MauMau
>
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at lists.pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20140413/586f1635/attachment.html>
From | Date | Subject | |
---|---|---|---|
Next Message | MauMau | 2014-04-13 22:28:58 | [Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process? |
Previous Message | MauMau | 2014-04-13 11:16:34 | [Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process? |