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.