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

From John R Pierce
Subject Re: Postgres.exe Process taking too much memory and CPU usage - making the system extremely slow.
Date
Msg-id 4B21F17F.4010105@hogranch.com
Whole thread Raw
In response to Postgres.exe Process taking too much memory and CPU usage - making the system extremely slow.  (<A.Bhattacharya@sungard.com>)
List pgsql-general
A.Bhattacharya@sungard.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.



pgsql-general by date:

Previous
From:
Date:
Subject: Postgres.exe Process taking too much memory and CPU usage - making the system extremely slow.
Next
From: "A. Kretschmer"
Date:
Subject: Re: Postgres.exe Process taking too much memory and CPU usage - making the system extremely slow.