Re: postgresql + apache under heavy load

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: Alex Madon <alex(dot)madon(at)bestlinuxjobs(dot)com>, Richard Huxton <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: postgresql + apache under heavy load
Date: 2004-01-21 21:35:01
Message-ID: 23502.1074720901@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com> writes:
> OK, the memory usage is NOT your problem. You have crashing postgresql
> backends, see the <defunct> and the listing of 3 zombie processes in top?
> That's bad. You very likely have bad memory in your box, or possibly
> other hardware problems.

While that could be true, the presence of a few zombie processes hardly
proves it. What that says to me is that the box is so loaded that the
postmaster isn't able to reap dead children instantaneously --- that is,
what we see is top running between the time that a backend quits and the
time the postmaster next gets to run.

While we don't have a lot of data for determining why the overload,
the top output:

>> CPU states: 91.8% user 8.1% system 0.0% nice 0.0% iowait 0.0% idle

sure looks like the bottleneck is CPU cycles, not disk (and not RAM
either, since RAM shortage would lead to swapping and hence disk waits).
Furthermore, the listing looks like it is the httpd processes that are
sucking CPU, not Postgres. I think this is actually not Postgres'
problem at all, but some inefficiency in the site's Web code.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alex Satrapa 2004-01-21 22:07:52 Re: SCO Extortion
Previous Message Larry Rosenman 2004-01-21 20:57:02 Re: SCO Extortion