On Tue, 11 Feb 2003, Hunter Hillegas wrote:
> When watching postmaster in top, I see it go from 4% to 30% of the CPU and
> back and forth, etc...
I don't think CPU utilization is a good measure of the need to change
parameters. You could have a badly configured setup which may not make the
CPU go high depending on the queries. You could have the same too.. a
poorly configured server which even with simple queries makes the CPU go
high.
> > Is there an easy way to determine if I need to adjust some settings,
> sort_mem, etc... to boost performance? Or trial and error?
I think trial and error is your ultimate solution.
What I do is that I have a table where I store the start/stop for most of
my routinarily runned queries. If I want to see if a setting change helps
I just make the change and run any of the daily queries. I have months
worth of sample times including changing machine, OS, etc.. I also may put
a note on the log such as "CPU/Memory upgrades" in the log so I can have
an idea of when I expect to see changes.