On Fri, Feb 22, 2008 at 8:54 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Dawid Kuroczko" <qnex42(at)gmail(dot)com> writes:
> > 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? ;-)).
> Why should we put any credence whatsoever in these numbers?
> I rather doubt that "memstat" knows anything about our palloc
> mechanism, so I don't see how it could possibly give reliable
> answers about how much memory one portion or another of Postgres
> is using.
> Having said that, it would be interesting to know exactly what it
> *is* measuring.
Correct me if I'm wrong, as well, but I believe that Linux (and
probably other modern Unices) does code-sharing, meaning that separate
processes referring to the same code/libraries will refer to the same
copy in physical memory.
So, even though each process is seeing 40 MB of libpgsql, there's
likely only 1 copy in physical memory. So, the total memory
consumption in the system from this library is 40 MB, not
In response to
pgsql-admin by date
|Next:||From: Tom Lane||Date: 2008-02-24 04:16:31|
|Subject: Re: PL/pgSQL memory consumption? |
|Previous:||From: Tena Sakai||Date: 2008-02-24 02:57:01|
|Subject: 8.3.0 postinstallation trouble|