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

Re: Configuring for maximum memory usage

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Christiaan Willemsen <cwillemsen(at)technocon(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Configuring for maximum memory usage
Date: 2008-10-30 15:45:12
Message-ID: 4909D688.1090806@commandprompt.com (view raw or flat)
Thread:
Lists: pgsql-performance
Christiaan Willemsen wrote:
> Hi there,

> The problem is getting it to use that much. At the moment, it only uses 
> almost 9 GB, so by far not enough. The problem is getting it to use 
> more... I hope you can help me with working config.

PostgreSQL is only going to use what it needs. It relies on the OS for 
much of the caching etc...

> 
> Here are the parameters I set in the config file:
> 
> shared_buffers = 8192MB

I wouldn't take this any higher.

> work_mem = 128MB

This is quite high but it might be o.k. depending on what you are doing.

> maintenance_work_mem = 2048MB

This is only used during maintenance so you won't see this much.

> max_fsm_pages = 204800
> max_fsm_relations = 2000

This uses very little memory.

> 
> Database is about 250 GB in size, so we really need to have as much data 
> as possible in memory.
> 
> I hope you can help us tweak a few parameters to make sure all memory 
> will be used.

You are missing effective_cache_size. Try setting that to 32G.

You also didn't mention checkpoint_segments (which isn't memory but 
still important) and default_statistics_target (which isn't memory but 
still important).

Joshua D. Drake


> 
> 
> 
> 


In response to

Responses

pgsql-performance by date

Next:From: Christiaan WillemsenDate: 2008-10-30 15:58:01
Subject: Re: Configuring for maximum memory usage
Previous:From: UlrichDate: 2008-10-30 15:42:55
Subject: Re: Configuring for maximum memory usage

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