views:

62

answers:

3

I have Postgres running on Windows and I'm trying to investigate the strange behaviour: There are 17 postgres processes, 8 out of those 17 consume ~300K memory each.

  • Does anybody know what such behavior is coused by?
  • Does anybody know about a tool to investigate the problem?
A: 

See pgAdmin: http://www.pgadmin.org/

Tomasz Kowalczyk
+1  A: 

8 out of those 17 consume ~300K memory each.

Are you 110% sure? Windows doesn't know how much memory is used from the shared buffers. Each proces could use just a few kb's and using the shared memory together with the other processes.

What problem do you have? Using memory is not a problem, memory is made to use. And 300KB each, that's just a few MB all together, if each proces is realy using 300KB.

And don't forget, PostgreSQL is a multi proces system. That's also why it scales so easy on multi core and multi processor systems.

Frank Heikens
- I've taken memory consuming numbers from the "Mem Usage" column of Windows Task Manager. Do you mean that it is not adequate for processes using shared memory?- I understand that PostgreSQL is a multi-process system, but 17 processes!?
voldemar
The "Mem Usage" column of Windows Task Manager doesn't know anything about shared memory, it's just an estimate. 17 processes isn't that much, sounds like a couple of basic processes (like the postmaster and auto_vacuum) and some connections from applications. When you have 50 connections, you will see more than 50 processes. Nothing to worry about, this is normal.
Frank Heikens
A: 

A tool for analyzing output from postgresql can be found at http://pgfouine.projects.postgresql.org/

pgFouine is a PostgreSQL log analyzer used to generate detailed reports from a PostgreSQL log file. pgFouine can help you to determine which queries you should optimize to speed up your PostgreSQL based application.

I don't think you can find out why you have alot of processes running, but if you feel that it might be because of database usage, this tool might help you find a cause.

Patrick