From: | 高健 <luckyjackgao(at)gmail(dot)com> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Is there any method to limit resource usage in PG? |
Date: | 2013-08-28 01:49:54 |
Message-ID: | CAL454F1LEWyBv_6uFyvLhFHStrvPThnnTJ_HoM4deKYA7joGVQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi:
Now the situation goes there:
In the testing environment,
even when my customer changed shared_buffers from 1024MB to 712MB or 512MB,
The total memory consumption is still almost the same.
I think that PG is always using as much resource as it can,
For a query and insert action,
Firstly , the data is pull into private memory of the backend process
which is service client.
Then, the backend process push the data into shared memory, here into
shared_buffers.
If the shared_buffers is not big enough to hold all the result data, then
part of data will be in shared_buffer,
the other data will still remain in backend process's memory.
Is my understanding right?
Best Regard
2013/8/27 Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
> On Sun, Aug 25, 2013 at 11:08 PM, 高健 <luckyjackgao(at)gmail(dot)com> wrote:
> > Hello:
> >
> > Sorry for disturbing.
> >
> > I am now encountering a serious problem: memory is not enough.
> >
> > My customer reported that when they run a program they found the totall
> > memory and disk i/o usage all reached to threshold value(80%).
> >
> > That program is written by Java.
> > It is to use JDBC to pull out data from DB, while the query joined some
> > table together, It will return about 3000,000 records.
> > Then the program will use JDBC again to write the records row by row ,
> to
> > inert into another table in the DB.
>
> What is using the memory, the postgres backend or the client program?
>
> Cheers,
>
> Jeff
>
From | Date | Subject | |
---|---|---|---|
Next Message | 高健 | 2013-08-28 01:54:55 | Re: What is the relationship between checkpoint and wal |
Previous Message | Carlos Saritama | 2013-08-28 01:12:31 | Re: OLAP |