pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Find how much memory is postgres using
8+ messages / 4 participants
[nested] [flat]

* Find how much memory is postgres using
@ 2013-04-07 04:59 Nik Tek <niktek2005@gmail.com>
  2013-04-07 07:15 ` Re: [PERFORM] Find how much memory is postgres using Yetkin Öztürk <yetkin85@gmail.com>
  2013-04-07 09:49 ` Re: [PERFORM] Find how much memory is postgres using hubert depesz lubaczewski <depesz@depesz.com>
  2013-04-08 07:13 ` Re: Find how much memory is postgres using Albe Laurenz <laurenz.albe@wien.gv.at>
  0 siblings, 3 replies; 8+ messages in thread

From: Nik Tek @ 2013-04-07 04:59 UTC (permalink / raw)
  To: pgsql-performance; pgsql-admin@postgresql.org

Hi,

Could someone tell m how to measure postgres memory usage.
Is there a pg_* view to measure?

Thank you
NikT

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [PERFORM] Find how much memory is postgres using
  2013-04-07 04:59 Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
@ 2013-04-07 07:15 ` Yetkin Öztürk <yetkin85@gmail.com>
  2 siblings, 0 replies; 8+ messages in thread

From: Yetkin Öztürk @ 2013-04-07 07:15 UTC (permalink / raw)
  To: Nik Tek <niktek2005@gmail.com>; +Cc: pgsql-performance; pgsql-admin@postgresql.org

Hi,
as you know 'memory usage' is smt continuously changes in time and not
directly related to pg also related to your resources , you can set a
specific  limit if you want.



2013/4/7 Nik Tek <niktek2005@gmail.com>

> Hi,
>
> Could someone tell m how to measure postgres memory usage.
> Is there a pg_* view to measure?
>
> Thank you
> NikT
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [PERFORM] Find how much memory is postgres using
  2013-04-07 04:59 Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
@ 2013-04-07 09:49 ` hubert depesz lubaczewski <depesz@depesz.com>
  2013-04-08 10:18   ` Re: Find how much memory is postgres using hubert depesz lubaczewski <depesz@depesz.com>
  2 siblings, 1 reply; 8+ messages in thread

From: hubert depesz lubaczewski @ 2013-04-07 09:49 UTC (permalink / raw)
  To: Nik Tek <niktek2005@gmail.com>; +Cc: pgsql-performance; pgsql-admin@postgresql.org

On Sat, Apr 06, 2013 at 09:59:16PM -0700, Nik Tek wrote:
> Could someone tell m how to measure postgres memory usage.
> Is there a pg_* view to measure?

http://www.depesz.com/2012/06/09/how-much-ram-is-postgresql-using/

Best regards,

depesz

-- 
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Find how much memory is postgres using
  2013-04-07 04:59 Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
  2013-04-07 09:49 ` Re: [PERFORM] Find how much memory is postgres using hubert depesz lubaczewski <depesz@depesz.com>
@ 2013-04-08 10:18   ` hubert depesz lubaczewski <depesz@depesz.com>
  2013-04-09 18:24     ` Re: Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: hubert depesz lubaczewski @ 2013-04-08 10:18 UTC (permalink / raw)
  To: Nik Tek <niktek2005@gmail.com>; +Cc: pgsql-performance

On Sun, Apr 07, 2013 at 09:27:42PM -0700, Nik Tek wrote:
> Thank you Depesz!
> But I have a naive question, why isn't a straight forword approach for
> postgres, unlike Oracle or MSSQL?

No idea. And how do you get memory usage in Oracle or MSSQL?

Best regards,

depesz



-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Find how much memory is postgres using
  2013-04-07 04:59 Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
  2013-04-07 09:49 ` Re: [PERFORM] Find how much memory is postgres using hubert depesz lubaczewski <depesz@depesz.com>
  2013-04-08 10:18   ` Re: Find how much memory is postgres using hubert depesz lubaczewski <depesz@depesz.com>
@ 2013-04-09 18:24     ` Nik Tek <niktek2005@gmail.com>
  2013-04-09 18:34       ` Re: Find how much memory is postgres using hubert depesz lubaczewski <depesz@depesz.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Nik Tek @ 2013-04-09 18:24 UTC (permalink / raw)
  To: Hubert Lubaczewski <depesz@depesz.com>; +Cc: pgsql-performance

--For MSSQL
select
(select cntr_value
        from sys.dm_os_performance_counters
        where object_name like '%Memory Manager%' and counter_name like
'Maximum Workspace Memory (KB)%') as Maximum_Workspace_Memory_KB,
    (select cntr_value
        from sys.dm_os_performance_counters
        where object_name like '%Memory Manager%' and counter_name like
'Target Server Memory (KB)%') as Target_Server_Memory_KB,
(select cntr_value
        from sys.dm_os_performance_counters
        where object_name like '%Memory Manager%' and counter_name like
'Maximum Workspace Memory (KB)%') * 100.0
     /
    (select cntr_value
        from sys.dm_os_performance_counters
        where object_name like '%Memory Manager%' and counter_name like
'Target Server Memory (KB)%')  as Ratio

-- Oracle
SELECT sum(bytes)/1024/1024
FROM v$sgastat;

Thank you
Nik



On Mon, Apr 8, 2013 at 3:18 AM, hubert depesz lubaczewski <depesz@depesz.com
> wrote:

> On Sun, Apr 07, 2013 at 09:27:42PM -0700, Nik Tek wrote:
> > Thank you Depesz!
> > But I have a naive question, why isn't a straight forword approach for
> > postgres, unlike Oracle or MSSQL?
>
> No idea. And how do you get memory usage in Oracle or MSSQL?
>
> Best regards,
>
> depesz
>
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Find how much memory is postgres using
  2013-04-07 04:59 Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
  2013-04-07 09:49 ` Re: [PERFORM] Find how much memory is postgres using hubert depesz lubaczewski <depesz@depesz.com>
  2013-04-08 10:18   ` Re: Find how much memory is postgres using hubert depesz lubaczewski <depesz@depesz.com>
  2013-04-09 18:24     ` Re: Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
@ 2013-04-09 18:34       ` hubert depesz lubaczewski <depesz@depesz.com>
  2013-04-09 18:42         ` Re: Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: hubert depesz lubaczewski @ 2013-04-09 18:34 UTC (permalink / raw)
  To: Nik Tek <niktek2005@gmail.com>; +Cc: pgsql-performance

On Tue, Apr 09, 2013 at 11:24:22AM -0700, Nik Tek wrote:
> --For MSSQL
> select
...
> -- Oracle
...

Well, the answer is simple - in Microsoft and Oracle, someone wrote such
views/functions. In Pg - not. You are welcome to provide a patch,
though :)

Best regards,

depesz



-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Find how much memory is postgres using
  2013-04-07 04:59 Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
  2013-04-07 09:49 ` Re: [PERFORM] Find how much memory is postgres using hubert depesz lubaczewski <depesz@depesz.com>
  2013-04-08 10:18   ` Re: Find how much memory is postgres using hubert depesz lubaczewski <depesz@depesz.com>
  2013-04-09 18:24     ` Re: Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
  2013-04-09 18:34       ` Re: Find how much memory is postgres using hubert depesz lubaczewski <depesz@depesz.com>
@ 2013-04-09 18:42         ` Nik Tek <niktek2005@gmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Nik Tek @ 2013-04-09 18:42 UTC (permalink / raw)
  To: Hubert Lubaczewski <depesz@depesz.com>; +Cc: pgsql-performance

Hi Depesz,

--Here is better one for Oracle by sga/pga.
SELECT DECODE (GROUPING (nm), 1, 'total', nm) nm,
       ROUND (SUM (val / 1024 / 1024)) MB
  FROM (SELECT 'sga' nm, SUM (VALUE) val FROM v$sga
        UNION ALL
        SELECT 'pga', SUM (VALUE)
          FROM v$sysstat
        WHERE name = 'session pga memory')
GROUP BY ROLLUP (nm);

Sure, I will take up the task, will send you the script once it is ready,
so you can bless it. :)

Regards
Nik




On Tue, Apr 9, 2013 at 11:34 AM, hubert depesz lubaczewski <
depesz@depesz.com> wrote:

> On Tue, Apr 09, 2013 at 11:24:22AM -0700, Nik Tek wrote:
> > --For MSSQL
> > select
> ...
> > -- Oracle
> ...
>
> Well, the answer is simple - in Microsoft and Oracle, someone wrote such
> views/functions. In Pg - not. You are welcome to provide a patch,
> though :)
>
> Best regards,
>
> depesz
>
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Find how much memory is postgres using
  2013-04-07 04:59 Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
@ 2013-04-08 07:13 ` Albe Laurenz <laurenz.albe@wien.gv.at>
  2 siblings, 0 replies; 8+ messages in thread

From: Albe Laurenz @ 2013-04-08 07:13 UTC (permalink / raw)
  To: Nik Tek *EXTERN* <niktek2005@gmail.com>; pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>

Nik Tek wrote:
> Could someone tell m how to measure postgres memory usage.
> Is there a pg_* view to measure?

No, you have to use operating system tools, like "ps" on UNIX.

Yours,
Laurenz Albe


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2013-04-09 18:42 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-04-07 04:59 Find how much memory is postgres using Nik Tek <niktek2005@gmail.com>
2013-04-07 07:15 ` Yetkin Öztürk <yetkin85@gmail.com>
2013-04-07 09:49 ` hubert depesz lubaczewski <depesz@depesz.com>
2013-04-08 10:18   ` hubert depesz lubaczewski <depesz@depesz.com>
2013-04-09 18:24     ` Nik Tek <niktek2005@gmail.com>
2013-04-09 18:34       ` hubert depesz lubaczewski <depesz@depesz.com>
2013-04-09 18:42         ` Nik Tek <niktek2005@gmail.com>
2013-04-08 07:13 ` Albe Laurenz <laurenz.albe@wien.gv.at>

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