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

PL/pgSQL memory consumption?

From: "Dawid Kuroczko" <qnex42(at)gmail(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: PL/pgSQL memory consumption?
Date: 2008-02-22 13:23:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Hi there,

I have recently found a nice utility called memstat (which shows how
much of private
(not shared)) memory each process uses.  What kind of surprised me was
the amount
of memory that is used by PL/pgSQL (one more reason not to provide it
by default? ;-)).

For example:
# sysctl -w|grep|head -6
  39048k: PID 23814 (/usr/lib/postgresql/8.2/lib/
  38972k: PID 23815 (/usr/lib/postgresql/8.2/lib/
  39048k: PID 23817 (/usr/lib/postgresql/8.2/lib/
  39048k: PID 23822 (/usr/lib/postgresql/8.2/lib/
  39048k: PID 23825 (/usr/lib/postgresql/8.2/lib/
  39048k: PID 23835 (/usr/lib/postgresql/8.2/lib/

Its an x86_64 platform, memory settings are:
 temp_buffers = 8MB
 work_mem = 8MB

...this does not include the library, which is shared by
all backends (which
use PL/pgSQL).  I know that system will eventually swap out unused parts, but
then again, 40MB * number_of_connections is a bit wasteful.  It seems to me that
both temp_buffers and work_mem don't affect's allocations.

I wonder if this is something specific for my setup, or if not, can we
reduce memory
used a bit.


PS: I am just starting research now, I thought other people's view is valuable.


pgsql-admin by date

Next:From: Raul Andres DuqueDate: 2008-02-22 14:42:39
Subject: Re: FW: [ADMIN] Clave usuario postgres
Previous:From: Wolfgang RodriguezDate: 2008-02-22 12:01:38
Subject: FW: Clave usuario postgres

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