Memory usage per session

From: AMatveev(at)bitec(dot)ru
To: pgsql-general(at)postgresql(dot)org
Subject: Memory usage per session
Date: 2016-07-08 11:11:46
Message-ID: 297136821.20160708141146@bitec.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi.
We have tested postgreSql,Oracle,MSSqlServer.
The test performs about 11K lines of code
Memory usage per session:
Oracle: about 5M
MSSqlServer: about 4M
postgreSql: about 160М
The result of postgreSql is very sad(Our typical business logic has about 30K lines of code).
How can I reduce memory consumption per session?
Note, we cant move the business logic to an application server as it will lead us to performance problem.

I can send the test script on request.

Test description:
PostgreSQL 9.5.3, compiled by Visual C build 1800, 64-bit
At the same time we run 50 sessions that perform the following functions:
CREATE OR REPLACE FUNCTION perfa.func9
...
BEGIN
svSql:='';
PERFORM perfb."func91"();
...
END;

CREATE OR REPLACE FUNCTION perfb.func91
...
BEGIN
PERFORM perfc."func911"();
...
END;

CREATE OR REPLACE FUNCTION perfc.func911 (
)
RETURNS void AS
$body$
DECLARE
svSql BIGINT;
BEGIN
svSql:=0;
...
svSql:=svSql+10;
END;
$body$

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Achilleas Mantzios 2016-07-08 11:41:53 Re: Memory usage per session
Previous Message Francisco Olarte 2016-07-08 09:56:55 Re: pasting a lot of commands to psql