Re: Postgres.exe Process taking too much memory and CPU usage - making the system extremely slow.

From: John R Pierce <pierce(at)hogranch(dot)com>
To: A(dot)Bhattacharya(at)sungard(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres.exe Process taking too much memory and CPU usage - making the system extremely slow.
Date: 2009-12-11 07:15:11
Message-ID: 4B21F17F.4010105@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

A(dot)Bhattacharya(at)sungard(dot)com wrote:
>
> Hi All.
>
>
>
> I have a program which import some 6000-10000 records in Postgres
> database. However the import of data is successful but the
> postgres.exe almost takes up entire memory and CPU.
>
>
>
> I could see in the process list there are lot of postgres.exe are
> running and one of the postgres.exe has taken up 98% of CPU.Even
> stopping the Postgres database service is not killing this processes
> running so I have to kill them individual processes.
>
>
>
> I have the below parameters set in Postgresql.conf file.
>
>
>
> # - Memory -
>
>
>
> shared_buffers = 512MB
>
> work_mem = 256MB
>

in 32bit XP, a user process gets a MAXIMUM of 2gb of address space (the
other 2gb of the 32bit address space is reserved by the kernel.
Further, you are limited to typically 3.1-3.3GB of physical memory

you are using 512MB of this for the shared_buffers, *AND* every postgres
connection process will use 256MB of workmem each time it needs to do a
sort or index shuffle or similar operation. thats going to hurt.

on a XP machine, I'd keep shared_buffers down around 256MB max (assuming
you have 3-4GB of physical memory, and I'd keep work_mem down around
32MB. maybe less if you expect more than a couple connecctions.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2009-12-11 07:21:41 Re: Postgres.exe Process taking too much memory and CPU usage - making the system extremely slow.
Previous Message A.Bhattacharya 2009-12-11 06:55:57 Postgres.exe Process taking too much memory and CPU usage - making the system extremely slow.