From: | Carl von Clausewitz <clausewitz45(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Shared Buffer Size |
Date: | 2011-05-30 05:34:53 |
Message-ID: | BANLkTimiaf_JNRGAVxcWY60gOjePniXDaQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks Toby, I will check it, and change it.
regards,
Carl
2011/5/30 Toby Corkindale <toby(dot)corkindale(at)strategicdata(dot)com(dot)au>
> On 28/05/11 18:42, Carl von Clausewitz wrote:
>
>> a few months ago, when I installed my first PostgreSQL, I have had the
>> same problem. I've try to get any information about optimal memory
>> config, and working, but there wasn't any "optimal memory setting
>> calculator" on the internet, just some guide in the posgre documentation
>> (
>> http://www.postgresql.org/docs/9.0/interactive/kernel-resources.html#SYSVIPC
>> ).
>> I got FreeBSD 8.2 AMD64, with 8 GB of memory (this server is just for
>> PostgreSQL and a little PHP app with 2 user), and I have theese setting
>> in postgresql.conf (which are not the default):
>>
>> [snip]
>
>> work_mem = 64MB# min 64kB
>> maintenance_work_mem = 1024MB# min 1MB
>> max_stack_depth = 64MB# min 100kB
>>
>
> Just a warning - but be careful about setting work_mem to high values.
> The actual memory used by a query can be many times the value, depending on
> the complexity of your query.
>
> In a particular query I saw last week, we were regularly exceeding the
> available memory on a server, because the query was requiring 80 times the
> value of work_mem, and work_mem had been set to a high value.
>
> Reducing work_mem back to just 4MB reduced memory usage by a couple of
> gigabytes, and had almost no effect on the execution time. (Actually, it was
> marginally faster - probably because more memory was left for the operating
> system's cache)
>
> Toby
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | Per-Olov Esgard | 2011-05-30 05:52:26 | Re: Is there any problem with pg_notify and memory consumption? |
Previous Message | Toby Corkindale | 2011-05-30 03:10:53 | Re: Shared Buffer Size |