pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anton Maksimenkov <anton200@gmail.com>
To: pgsql-performance@postgresql.org
Subject: How exactly PostgreSQL allocates memory for its needs?
Date: Wed, 10 Feb 2010 10:10:36 +0500
Message-ID: <8cac8dd1002092110q45411eb1j63bc1b3ce40f3d2e@mail.gmail.com> (raw)

Can anybody briefly explain me how each postgres process allocate
memory for it needs?
I mean, what is the biggest size of malloc() it may want? How many
such chunks? What is the average size of allocations?

I think that at first it allocates contiguous piece of shared memory
for "shared buffers" (rather big, hundreds of megabytes usually, by
one chunk).
What next? temp_buffers, work_mem, maintenance_work_mem - are they
allocated as contiguous too?
What about other needs? By what size they are typically allocated?
-- 
antonvm



view thread (3+ messages)  latest in thread

Message-ID: <8cac8dd1002092110q45411eb1j63bc1b3ce40f3d2e@mail.gmail.com>
Permalink:  ../8cac8dd1002092110q45411eb1j63bc1b3ce40f3d2e@mail.gmail.com/
Also on:    postgresql.org/message-id/8cac8dd1002092110q45411eb1j63bc1b3ce40f3d2e@mail.gmail.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: anton200@gmail.com
  Subject: Re: How exactly PostgreSQL allocates memory for its needs?
  In-Reply-To: <8cac8dd1002092110q45411eb1j63bc1b3ce40f3d2e@mail.gmail.com>
  References: <8cac8dd1002092110q45411eb1j63bc1b3ce40f3d2e@mail.gmail.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