Re: PL/pgSQL memory consumption?

Поиск
Список
Период
Сортировка
От Peter Koczan
Тема Re: PL/pgSQL memory consumption?
Дата
Msg-id 4544e0330802231917x2045466s735989836698df2@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PL/pgSQL memory consumption?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PL/pgSQL memory consumption?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
On Fri, Feb 22, 2008 at 8:54 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Dawid Kuroczko" <qnex42@gmail.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
40*num_processes MB.

Peter

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Tena Sakai"
Дата:
Сообщение: 8.3.0 postinstallation trouble
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PL/pgSQL memory consumption?