HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

View Postgresql Memory Usage

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresqlusageviewmemory

Problem

I'm running Postgresql on a Ubuntu server and need to be able to monitor its memory usage. Currently I have scripts running in a one-minute cron job that monitor/log various statistics and need to also monitor/log the current memory usage of Postgresql. I've searched around and haven't been able to find much, other than the fact that Postgresql makes good use of shared memory so the values given by a program such as 'top' aren't accurate.

How can I monitor what the total memory usage of Postgresql is at any given time? This data will later be used to create graphs for analysis.

Solution

Memory usage in linux in general and for Postgres in particular is a pretty complex subject, a good starting point is Bruce Momjians blog covering the subject and the usage of smem. It is well worth following the links in Chris Seibenmanns blog on the subject.

Context

StackExchange Database Administrators Q#12501, answer score: 8

Revisions (0)

No revisions yet.