Re: Postgres CPU usage

From: Ryan Mahoney <ryan(at)paymentalliance(dot)net>
To: Linh Luong <linh(dot)luong(at)computalog(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres CPU usage
Date: 2001-05-24 12:32:30
Message-ID: 5.0.2.1.0.20010524132659.026b09b0@paymentalliance.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have never had the postmaster die on me, although I have made is slow to
almost a halt ;)

Performance really depends what your doing. It is possible to write a
query that uses all system resources.

I recommend restarting postgres and take a look at the CPU utilization and
make sure at start-up you are at a normal percent.

Then, execute your query once and look at the result. Is it at 100%? How
long does it stay at 100%?

Run EXPLAIN in psql on the major queries in your application and see what
the estimated cost is. If the cost is relatively low - there is probably a
configuration problem with your system architecture or PHP logic.

If the cost is very high you may need to rethink your query to better use
indexes, etc.

Good Luck!

-r

At 11:09 AM 5/24/01 -0600, Linh Luong wrote:

>Hi all,
>
>I am running postgres7.1 and php4.0. When I do top while running my
>query via browser I notice that the postmaster process takes up almost
>100% of the CPU and this is just for one user. What would happen if
>multiple users does the same search at the same time would the
>postmaster die?
>
>Thanks
>
>
>--
>Linh Luong
>Computalog Ltd.
>Software Developer
>Phone: (780) 464-6686 (ext 325)
>Email: linh(dot)luong(at)computalog(dot)com
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>message can get through to the mailing list cleanly
>
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.251 / Virus Database: 124 - Release Date: 4/26/01

Attachment Content-Type Size
unknown_filename text/plain 166 bytes

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sergey E. Volkov 2001-05-24 12:50:40 Re: Return cursor
Previous Message Justin Clift 2001-05-24 12:27:46 [Fwd: info]