Обсуждение: Profiling

Поиск
Список
Период
Сортировка

Profiling

От
"Werner vd Merwe"
Дата:

Good day all!

 

I posted this question in NOVICE some time ago, but have not really had any replies.

 

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.

 

The current hardware config is as follows:

 

Dual Xeon 2.4GHz CPU’s

3 GB RAM

3 X WD 73 GB drives in RAID-5

 

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.

 

Hope the question makes sense.

 

Best regards and thank you in advance.

Werner vd Merwe

Re: Profiling

От
mike g
Дата:
There are but it depends if you are running under Solaris, Linux etc.

Most of the below can be checked with applications included with your
OS.

Mike
On Fri, 2004-07-23 at 06:23, Werner vd Merwe wrote:
> Good day all!
>
>
>
> I posted this question in NOVICE some time ago, but have not really
> had any replies.
>
>
>
> 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.
>
>
>
> The current hardware config is as follows:
>
>
>
> Dual Xeon 2.4GHz CPU’s
>
> 3 GB RAM
>
> 3 X WD 73 GB drives in RAID-5
>
>
>
> 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.
>
>
>
> Hope the question makes sense.
>
>
>
> Best regards and thank you in advance.
>
> Werner vd Merwe
>
>

Re: Profiling

От
Gaetano Mendola
Дата:
mike g wrote:

> There are but it depends if you are running under Solaris, Linux etc.
>
> Most of the below can be checked with applications included with your
> OS.
>
> Mike
> On Fri, 2004-07-23 at 06:23, Werner vd Merwe wrote:

and make out some graphs using cricket ( google for details ).


Regards
Gaetano Mendola




Re: Profiling

От
Simon Riggs
Дата:
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