Jeremy Smith wrote:

I have newly installed PostgreSQL onto my server, the server's main function
is to serve up a fantasy football site that has a tremendous number of
queries per page.  Right now with very low traffic I am seeing a server load
of 2.0+.  That got me a little concerned, so I looked at "top" and noticed
that postgres is taking anywhere from 60 - 100 percent of my CPU at any
given time.  There are also 116 sleeping processes out of 123.  This all
seems very bad, do you guys have any idea what might be causing it or how it
can be addressed?  How do I go about cleaning out the sleeping processes?

I agree with Lamar's comments, as well as wondering if it is really needed to run a 'tremendous number of queries' for each page view... Some quick solutions could be to determine if you could:

1) make changes to your design to require fewer hits to the database per page,
2) make a view that provided the information without running so many separate queries, and/or
3) consider using a caching library like ADOdb to limit the number of trips to your database


Any combination of these three could significantly reduce the load on your DB box, as well as provide some huge performance gains. How hard is your webserver working? Are they running on the same box?

-- Mitch


---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to