Re: pgtune

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Sim Zacks <sim(at)compulab(dot)co(dot)il>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pgtune
Date: 2010-08-10 20:43:31
Message-ID: 4C61B9F3.4020807@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sim Zacks wrote:
> 1) Are these settings the maximum that the server will handle, if it is
> strictly dedicated to postgresql? Meaning if I am running other stuff on
> the server as well, this would be a bad idea.
>

The idea is that they will be in the right general range for a system
running nothing but PostgreSQL. The current code goes a little far in
that regard; I've gotten some reports that its setting for work_mem in
particular is a bit too high for some people. If the amount of memory
you'd like to set aside for PostgreSQL use is smaller than the "all of
the RAM in the server" it defaults to, just pass it "-M <bytes>" with a
smaller setting. For example, if the server has 8GB of RAM, but you
only want half to be considered usable by the server, you could add "-M
4294967296". Note that the server doesn't enforce a hard limit here and
pgtune will give you high settings for everything, by design.

> 1a) If I have some intense plpython stored procedures, do they run in
> the postgresql memory space (ie using the memory settings from the
> postgresql.conf, or do they run under their own memory space and then I
> would have to take that into account when allocating postgresql memory?
>

Most of the memory settings set in the postgresql.conf impact shared
memory uses only by the server. The main client side setting is
work_mem, which isn't directly involved in allocating memory; it's only
a rough guide to how much memory clients should use for operations like
sorting and hashing. If your stored procedure uses a bunch of memory,
that's being allocated by the client running it, with no reference to
any server side setting.

> 2) If it sets my max_connections to 80 and would like to set it at 300,
> what would be the appropriate setting to lower at its expense?
>

Set "-c 300" when you run pgtune and it will do the right thing here.

--
Greg Smith 2ndQuadrant US Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.us

In response to

  • pgtune at 2010-08-09 10:42:46 from Sim Zacks

Responses

  • Re: pgtune at 2010-08-11 07:52:15 from Jacqui Caren-home

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-08-10 21:57:47 Re: fork() and dynamically loaded c functions....
Previous Message Vibhor Kumar 2010-08-10 20:02:18 Re: pgtune