Re: why is the db so slow? - Mailing list pgsql-performance

From Josh Berkus
Subject Re: why is the db so slow?
Date
Msg-id 200305031132.56012.josh@agliodbs.com
Whole thread Raw
In response to why is the db so slow?  (Becky Neville <rebecca.neville@yale.edu>)
Responses Re: why is the db so slow?  (brew@theMode.com)
List pgsql-performance
Becky,

> I am running my own database server but I don't have root privilege (and
> no hope of getting it.)
<snip>
> typing something as dumb as  \! pwd is not instantaneous either and there
> doesn't seem to be anyone else hogging up the CPU.

It sounds to me like the system has something wrong with it if "pwd" takes a
while to respond.  Even if CPU isn't in heavy use, I'd guess some other
process is eating RAM or disk I/O

> I am on Linux and due to lack of space in my own account, I have PGDATA
> pointing to /tmp.
> (This is for a class project to analyze query performance ...I can
> recreate the data at any time if necessary.)

Really?   What class?   I'm personally very interested to know of schools that
are teaching PostgreSQL.

However, if this is for school, PostgreSQL is not very efficient being run as
a seperate installation for each user.    For multiuser installations, it is
far better to have one installation and many databases with restricted
permissions.

I also suspect that you database being in /tmp may be causing you problems;
many sysadmins put the /tmp partition on their slowest drive since it's
regarded as disposable.

> Are there any parameters I can set to speed things up?

Lots, the settings of many of which are a matter of debate.   I suggest that
you browse through the online archives of this list, which will be far more
educational than me giving you a few tips.

However, be aware that no postgresql.conf settings, however clever, can make
up for an overloaded system, poor disk configuration, or slow system I/O.
At best correct settings ameliorate poor performance.

--
Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-performance by date:

Previous
From: Joe Conway
Date:
Subject: Re: why is the db so slow?
Next
From: Josh Berkus
Date:
Subject: Re: NOT IN doesn't use index? (fwd)