Re: Memory usage per session - Mailing list pgsql-general

From Pavel Stehule
Subject Re: Memory usage per session
Date
Msg-id CAFj8pRAJDA+JxgMeCTwBsvUEop06WfZpO45DY9_64f0SbzHF6A@mail.gmail.com
Whole thread Raw
In response to Re: Memory usage per session  (AMatveev@bitec.ru)
List pgsql-general


2016-07-08 17:49 GMT+02:00 <AMatveev@bitec.ru>:
Hi


>> Oracle: about 5M
>> postgreSql: about 160М



>The almost session memory is used for catalog caches. So you should to have big catalog and long living sessions. 

>What do you do exactly?

I've generate test code that  emulates instruction tree size for our production code.
This test shows:
-What is the size of instruction tree for our typical  BP  
  it's greater than 300M for each session 
-How often do PostgreSql parse the text 
  When postgres clean cache, so much often

PostgreSQL parses the source code of functions once per session
 
 

So Oracle is much better in this case. 
It's very difficult really estimate in such case, to buy Oracle or to by hardware.

Should be - The implementation of PLpgSQL and PL/SQL is strongly different. When your case is not usual, then the migration to Postgres needs redesign sometimes.

Regards

Pavel

pgsql-general by date:

Previous
From: John McKown
Date:
Subject: Re: Memory usage per session
Next
From: Alvaro Herrera
Date:
Subject: Re: pasting a lot of commands to psql