Обсуждение: Postgres CPU usage

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

Postgres CPU usage

От
Linh Luong
Дата:
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.luong@computalog.com

Re: Postgres CPU usage

От
"Thalis A. Kalfigopoulos"
Дата:
On Thu, 24 May 2001, 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.luong@computalog.com

Well if your CPU is idle, shouldn't someone do smthing usefull with it :-)
If N users do the sam search postmaster wouldn't die.
Go through http://www.postgresql.org/idocs/index.php?arch.html wrt the Postgres architecture.

cheers,
thalis


Re: Postgres CPU usage

От
Ryan Mahoney
Дата:
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.luong@computalog.com
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.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

---
Outgoing 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