Accessing multiple cursors from different erlang processes

35 views
Skip to first unread message

iztok....@gmail.com

unread,
Mar 7, 2016, 2:22:51 PM3/7/16
to Erlang epgsql Postgres driver use and development
Hello,

we are working on distributed query processor for RDF in Erlang.
Multiple cursors are open on local PGSQL server via epgsql.
Results are fetched from cursors in blocks.

It seems that we are able to read efficiently from one cursor only at
given timepoint. When trying to read from multiple cursors (from different
processes) the performance is catastrophic.

What can be the reason for such performance?
Any known issues? Advise?

Thank you in advance for help!

Iztok

Sergey Prokhorov

unread,
Mar 8, 2016, 5:27:34 PM3/8/16
to Erlang epgsql Postgres driver use and development, iztok....@gmail.com
Can you show us some minimum code example (even schematic).

понедельник, 7 марта 2016 г., 22:22:51 UTC+3 пользователь iztok....@gmail.com написал:

iztok....@gmail.com

unread,
Mar 9, 2016, 8:10:32 AM3/9/16
to Erlang epgsql Postgres driver use and development, iztok....@gmail.com
I will gather also the code if it will be needed.

Let me first present a general but quite simple schema.

-- We have two (or more) Erlang processes running on one physical machine.
-- These two Erlang processes are accessing pgsql through epgsql.
-- Each of the Erlang processes repeatedly opens and accesses cursor
queries that are *reading* from pgsql (there are no writes).
The cursor results are read in blocks.
-- The empirical results show that only one Erlang process can communicate
efficiently with pgsql (through epgsql).
-- In the case we have two or more Erlang processes accessing cursors
in pgsql the performance is really bad.


Dne torek, 08. marec 2016 23.27.34 UTC+1 je oseba Sergey Prokhorov napisala:
Reply all
Reply to author
Forward
0 new messages