Skip site navigation (1) Skip section navigation (2)

Re: Profiling

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Werner vd Merwe <werner(at)saicom(dot)co(dot)za>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Profiling
Date: 2004-07-25 22:08:35
Message-ID: 1090793315.3057.1643.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Fri, 2004-07-23 at 12:23, Werner vd Merwe wrote:

> We are running a PG7.4 database, being accessed through jsp’s called
> through Tomcat. The problem is, that sometimes the database comes to a
> complete standstill, sometimes because of deadlocks, but I would
> venture to say that most times it is because it runs out of resources.

It's fairly common in that kind of a set-up to issue commands that
deadlock against each other.

Worse, its possible to deadlock in your application in ways that the
database can't actually tell its a deadlock, because it can't see the
whole picture. Entity beans are just not good.

Running out of resources is a good indication of this kind of blockage,
which I hasten to add is nothing whatsoever to do with PostgreSQL - this
would occur whichever RDBMS you used.

Look at the table locking sequence in your application and try to avoid
differently ordered sequences. This may require you to redesign your
application to prevent certain page sequences that conflict badly with
the main routes.

You'll need to read up on this a lot more to understand it fully.

> My question is, are there any software or apps out there that can
> monitor CPU, memory and shared buffer usage etc so I can have a
> pro-active way of monitoring when we need to upgrade hardware, or just
> tweak the software. I am aware that running complex queries will take
> a large chunk of CPU time, but it would be good for me to have the
> normal running load of PG.

Check the PostgreSQL manual pages entitled "Monitoring Database
Activity". In light of the above comments, you will find this useful,
but not the answer to your problems.

Best Regards, Simon Riggs

In response to

  • Profiling at 2004-07-23 11:23:16 from Werner vd Merwe

pgsql-admin by date

Next:From: Peter EisentrautDate: 2004-07-25 22:44:37
Subject: Re: Can't increase max connections
Previous:From: Gaetano MendolaDate: 2004-07-25 00:03:59
Subject: Re: Utilizing multiple disks

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group