Re: postgresql + apache under heavy load

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

On Wed, Jan 21, 2004 at 04:47:57PM -0700, scott.marlowe wrote:
> On Wed, 21 Jan 2004, Alex Madon wrote:
>
> > PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
> > 7 root 16 0 0 0 0 SW 1.2 0.0 0:07 0
> > kscand/Normal
> > 5 root 15 0 0 0 0 SW 1.0 0.0 0:01 0 kswapd
> > 7050 apache 15 0 8016 5896 1580 D 1.0 1.5 0:00 0 httpd
> > 3870 madona 15 0 6540 1440 472 D 0.6 0.3 0:07 0 xterm
> > 7032 apache 15 0 8336 7568 1980 S 0.6 1.9 0:00 0 httpd
> > 7051 apache 15 0 4784 1640 280 D 0.6 0.4 0:00 0 httpd
> > 2581 root 15 0 15928 1452 704 S 0.5 0.3 5:40 0 X
> > 6985 madona 16 0 788 732 476 R 0.5 0.1 0:00 0 top
> > 7023 apache 15 0 7956 7160 1736 S 0.4 1.8 0:00 0 httpd
> > 7025 apache 15 0 7944 6816 1584 D 0.4 1.7 0:00 0 httpd
> > 7027 apache 15 0 7808 6976 1588 D 0.4 1.8 0:00 0 httpd
> > 7052 apache 15 0 6616 3584 404 D 0.3 0.9 0:00 0 httpd
>
> Are any of the underlying tables really large and maybe being seq scanned?
> I'm strictly guessing here. anyone else have any ideas? I'm stumped.

'D' processes are probably I/O bound, but why would webserver processes
be so busy reading from disk? 'postmaster' processes had 'S' status
AFAIR, so the load is probably elsewhere, not Postgres.

My guess would be that the Apache processes are doing something
completely unexpected.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Thou shalt check the array bounds of all strings (indeed, all arrays), for
surely where thou typest "foo" someone someday shall type
"supercalifragilisticexpialidocious" (5th Commandment for C programmers)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-01-22 00:29:16 Re: CTTAS w/ DISTINCT ON crashes backend
Previous Message Tom Lane 2004-01-22 00:04:56 Re: Lost plpgsql function