Re: Question about maintenance_work_mem and shared_buffer

From: Rodrigo Barboza <rodrigombufrj(at)gmail(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Question about maintenance_work_mem and shared_buffer
Date: 2013-05-22 12:52:51
Message-ID: CANs8QJbnGfdN3ir2x+JBZtAwkJ60CpNBhWTdm9X9sD-3unp_0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, May 22, 2013 at 6:14 AM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>wrote:

> Rodrigo Barboza wrote:
> > I have a doubt.
> > I have a 32-bit postrgesql running with 2.5gb of shared_buffer.
> > And I have maintenance_work_mem = 1gb and autovacuum_max_workers = 3.
> > How maintenance_work_mem is related to shared_buffer?
> > If the 3 workers uses 1gb, will the database crash?
> > Or their memory usage are separated from each other?
>
> Your doubt is quite in place, as a process on a 32-bit architecture
> cannot address more than 4GB of memory.
>
> See http://rhaas.blogspot.jp/2011/05/sharedbuffers-on-32-bit-systems.html
>
> shared_buffers plus the private memory of a backend shouldn't
> exceed 3GB.
>
> So I'd go for shared_buffers = 2GB and maintenance_work_mem much
> smaller than 1GB.
>
> Yours,
> Laurenz Albe
>

Perfect.
Thanks, guys!

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Dev Kumkar 2013-05-22 18:24:16 Re: [ODBC] ODBC constructs
Previous Message lakkireddy 2013-05-22 10:04:55 Re: Query is stuck