[imp] high load average with postgresql
Rich Lafferty
rich@horde.org
Tue, 24 Apr 2001 16:24:01 -0400
On Tue, Apr 24, 2001 at 03:13:04PM -0500, Matthew M Carroll (mmc2@csd.uwm.edu) wrote:
> On Tue, 24 Apr 2001, Rich Lafferty wrote:
> >
> > Hm. Look at horde/imp/lib/db.pgsql and horde/phplib/db_pgsql.inc -- do
> > they call pg_connect() or pg_pconnect()?
>
> horde/imp/lib/db.pgsql was using pg_pconnect I have changed it,
> phplib/db_pgsql.inc was using the right function.
Okay, I bet this will make a big difference. (Don't forget to shut
down apache, shut down postgres, start postgres, start apache.)
> > > My postmaster startup parameters are
> > >
> > > /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data -A 1 -B 768 -b
> > > /usr/bin/postgres -i -N 384
> >
> > This looks okay, I suppose -- I take it you've enabled assert checks
> > for some other application on that server? If not, you don't need
> > them.
>
> I was wondering what the -A 1 was I cant find it in the man for
> postmaster. What exactly does that do? As you can tell I am new to
> postgres.
It enables assertion checking in your stored procedures. If you're not
using the database for anything else, then you aren't using stored
procedures, and you don't need it turned on. :-) It's meant for
debugging on nonproduction systems.
> > > I guess I am wondering if the -F parameter on postgres will help that
> > > much?
> >
> > Are you having problems with disk performance, too?
>
> Now that you mention it I am having problem with disk at times I have had
> a load avg of 30 with 70% idle time on both cpu's.
I'm not sure what I should be reading out of that. Wouldn't you be
better off looking at the disk than the CPU to determine disk
performance? I'd be very surprised if Postgres is slow because of *disk*.
I'm assuming your machine isn't swapping.
> If I were to use the -F option would I put it after the /usr/bin/postgres
> so my postmaster.opts would look like this?
I can't think of any reason you would need that option. -F is
basically a "Disk access is so slow that I'm willing to risk losing
data to keep performance up" option.
-Rich
--
------------------------------ Rich Lafferty ---------------------------
Sysadmin/Programmer, Instructional and Information Technology Services
Concordia University, Montreal, QC (514) 848-7625
------------------------- rich@alcor.concordia.ca ----------------------