Thread: Postgres 8.2 Memory Tuning

Postgres 8.2 Memory Tuning

From
CM J
Date:
Hi ,

        I have installed Postgres 8.2 in windows with  default configuration.The windows machine has dual processor(2 GHZ,1GHZ) with 1 GB RAM.I use my java application with postgres and my database connection pool has some 25 connections.I understand from the documentation that postgres starts a seperate process for each of the connection.Now, my application and the database will be installed on the same system.Even under moderate load in my application, each of the postgres process occupies some 25 MB memory leading to total postgres memory usage of 500+ MB. Now, how do i  limit the memory used by each of the postgres process to bring down the over all memory usage ?

Thanks

Re: Postgres 8.2 Memory Tuning

From
"Massa, Harald Armin"
Date:
CMJ,

same system.Even under moderate load in my application, each of the postgres process occupies some 25 MB memory leading to total postgres memory usage of 500+ MB. Now, how do i  limit the memory used by each

how did you measure those 25MB and those 500+MB MEMORY usage?

I guess you are running windows task manager and looking into the default memory column. That is adress space used, rather then memory used. So Postgres is using 500MB of adress space; share_memory of those processes is accounted for every process.

Look within additional columns of taskmanager to find the one giving the private memory of the process.

Especially on windows you should update to the latest 8.3.x PostgreSQL.

Harald

 



--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pigeon
-
LASIK good, steroids bad?

Re: Postgres 8.2 Memory Tuning

From
CM J
Date:
Hi,

        I need to measure the memory used by postgres under various loads in my application.How to calculate the exact memory used by postgres for OS:Windows as well as linux ?

Thanks,
CM J

On Mon, Jun 15, 2009 at 5:37 PM, Massa, Harald Armin <chef@ghum.de> wrote:
CMJ,

same system.Even under moderate load in my application, each of the postgres process occupies some 25 MB memory leading to total postgres memory usage of 500+ MB. Now, how do i  limit the memory used by each

how did you measure those 25MB and those 500+MB MEMORY usage?

I guess you are running windows task manager and looking into the default memory column. That is adress space used, rather then memory used. So Postgres is using 500MB of adress space; share_memory of those processes is accounted for every process.

Look within additional columns of taskmanager to find the one giving the private memory of the process.

Especially on windows you should update to the latest 8.3.x PostgreSQL.

Harald

 



--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pigeon
-
LASIK good, steroids bad?

Re: Postgres 8.2 Memory Tuning

From
Eduardo Morras
Date:
At 08:56 16/06/2009, you wrote:
>Hi,
>
>         I need to measure the memory used by postgres under various
> loads in my application.How to calculate the exact memory used by
> postgres for OS:Windows as well as linux ?

Download ProcessXP from Microsoft (before it was from Sysinternals).
There you will see some cool graphs with private memory and other
useful info (page faults, I/O, etc...)

>Thanks,
>CM J