[ic] Maximum CPU usage

interchange-users@interchange.redhat.com interchange-users@interchange.redhat.com
Sat Nov 17 11:05:00 2001


On Sat, Nov 17, 2001 at 09:45:09AM -0500, Jon Jensen wrote:
> On Sat, 17 Nov 2001, FCT Maillist wrote:
> 
> > I am using IC 4.8.1 on Linux 7.0 with a PostGreSQL database. But on being
> > accessed by only 3-4 users , the system becomes slow and the CPU usage
> > clocks 99% usage. The catalogs built for each user occupies maximum server
> > resources.
> >

99% doesn't mean that they are working hard, it just means they are using
everything they can get.

I'm not sure what you mean by "each user occupies maximum server resources".
Do you mean that happens at the 99% or in normal "quiet" state?  If the former, 
that is why quotas exist; if the latter, then you are guaranteeing the former. 

I've done this plenty of times without any help from postgres; don't assume
that is the cause (or that it is not).  :-)


> > How do we overcoemn this isuue? Has anyone experienced similar problems? Any
> > way out?
> 
> What version of PostgreSQL are you running? (Do 'psql --version'.) If it's
> anything earlier than 7.1, you definitely need to upgrade. Major
> improvements were made between PostgreSQL 7.0 and 7.1, to say nothing of
> the improvements since 6.5.
> 
> Anyway, the most generally useful thing to do is to enable query logging
> in the PostgreSQL daemon and find out what's taking so much time. To do
> that, you pass option "-d 2" to the postmaster and send its stdout to a
> file instead of to /dev/null like most postmaster startup scripts do.
> Here's how I did it with PostgreSQL 7.1.2 on Red Hat Linux 7.1. Make this
> patch to /etc/rc.d/init.d/postgresql:
> 
> 142c142
> <               su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -D $PGDATA -p /usr/bin/postmaster start  > /dev/null 2>&1" < /dev/null
> ---
> >               su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -D $PGDATA -o '-d 2' -p /usr/bin/postmaster start  > /var/log/pgsql 2>&1" < /dev/null
> 
> Then do 'tail -f /var/log/pgsql' and watch the output while you visit
> various pages on your site. You should be able to get an idea of what's
> taking so much time.
> 
> Jon
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users

-- 

Christopher F. Miller, Publisher                               cfm@maine.com
MaineStreet Communications, Inc           208 Portland Road, Gray, ME  04039
1.207.657.5078                                         http://www.maine.com/
Content/site management, online commerce, internet integration, Debian linux