pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christiaan Willemsen <cwillemsen@technocon.com>
To: Scott Carey <scott@richrelevance.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Configuring for maximum memory usage
Date: Thu, 30 Oct 2008 17:56:16 +0100
Message-ID: <4909E730.5010400@technocon.com> (raw)
In-Reply-To: <a1ec7d000810300918w666f705eva3f8fb720dfd7aaf@mail.gmail.com>
References: <4909CF9C.80701@technocon.com>
	<a1ec7d000810300918w666f705eva3f8fb720dfd7aaf@mail.gmail.com>

Hi Scott,

Thaks for the clear answers!

Scott Carey wrote:
> You must either increase the memory that ZFS uses, or increase 
> Postgresql shard_mem and work_mem to get the aggregate of the two to 
> use more RAM.
>
> I believe, that you have not told ZFS to reserve 8GB, but rather told 
> it to limit itself to 8GB. 
That is correct, but since it will use the whole 8 GB anyway, I can just 
as easily say that it will reseve that memory ;)
>
> Some comments below:
>
> On Thu, Oct 30, 2008 at 8:15 AM, Christiaan Willemsen 
> <cwillemsen@technocon.com <mailto:cwillemsen@technocon.com>> wrote:
>
>     Hi there,
>
>     I configured OpenSolaris on our OpenSolaris Machine. Specs:
>
>     2x Quad 2.6 Ghz Xeon
>     64 GB of memory
>     16x 15k5 SAS
>
> If you do much writing, and even moreso with ZFS, it is critical to 
> put the WAL log on a different ZFS volume (and perhaps disks) than the 
> data and indexes.
I already did that. I also have a separate disk pair for the ZFS intent log.

> Are you counting both the memory used by postgres and the memory used 
> by the ZFS ARC cache?  It is the combination you are interested in, 
> and performance will be better if it is biased towards one being a 
> good chunk larger than the other.  In my experience, if you are doing 
> more writes, a larger file system cache is better, if you are doing 
> reads, a larger postgres cache is better (the overhead of calling 
> read() in 8k chunks to the os, even if it is cached, causes CPU use to 
> increase).
No, the figure I gave is this is without the ARC cache.
> If you do very large aggregates, you may  need  even 1GB on work_mem.  
> However, a setting that high would require very careful tuning and 
> reduction of space used by shared_buffers and the ZFS ARC.  Its 
> dangerous since each connection with a large aggregate or sort may 
> consume a lot of memory.
Well, some taks may need a lot, but I guess most wil do fine with the 
settings we used right now.

So It looks like I can tune the ARC to use more memory, and also 
increase shared_mem to let postgres cache more tables?

view thread (15+ messages)  latest in thread

Message-ID: <4909E730.5010400@technocon.com>
Permalink:  ../4909E730.5010400@technocon.com/
Also on:    postgresql.org/message-id/4909E730.5010400@technocon.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: cwillemsen@technocon.com, scott@richrelevance.com
  Subject: Re: Configuring for maximum memory usage
  In-Reply-To: <4909E730.5010400@technocon.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox