Skip site navigation (1) Skip section navigation (2)

Re: how much memory to allot to postgres?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: shridhar_daithankar(at)persistent(dot)co(dot)in
Cc: Postgres-Mailing-List <pgsql-general(at)postgresql(dot)org>
Subject: Re: how much memory to allot to postgres?
Date: 2003-01-30 15:33:28
Message-ID: 19562.1043940808@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
"Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in> writes:
> On 29 Jan 2003 at 13:34, Francisco J Reyes wrote:
>> Just checked my values and I have 128MB for vacuum and sort. Is that
>> overkill?

> Absolutely. Especially sort mem. If you are allocatingg 128MB sort mem for each 
> connection, you will soon be dry with memory. I would say 8MB to 16MB sort 
> memory depending upon number of conenctions you want to entertain at a time. 
> Just remember it is per connection.

Worse than that: it's per sort step (or hash step).  It's not at all
unlikely that an N-table query would be running N-1 sorts or hashes in
parallel; plus maybe more to implement aggregation, grouping, ORDER BY,
etc.  So unless all your queries are very simple, you'd better figure
on some multiple of sort_mem per connection.

>> It seems I only have 2MB of WAL buffer.. I have large daily loads of data.
>> Will a number above 10MB help? ie 16MB

> 16MB is good.

16MB is probably vast overkill.  Are you able to measure any change in
performance at all from increasing wal_buffers?  I can't see a reason
that more than a dozen or so wal buffers would be useful.  Almost
certainly, those megabytes would be more effectively used as
general-purpose kernel disk cache.

			regards, tom lane

In response to

pgsql-general by date

Next:From: pginfoDate: 2003-01-30 15:47:57
Subject: Re: URGENT: referential integrity problem
Previous:From: Marc G. FournierDate: 2003-01-30 15:32:53
Subject: Re: donations?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group