Re: postgresql + apache under heavy load

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Alex Madon <alex(dot)madon(at)bestlinuxjobs(dot)com>
Cc: 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-21 23:47:57
Message-ID: Pine.LNX.4.33.0401211644230.21832-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 21 Jan 2004, Alex Madon wrote:

> One can see that at the maximum feeling of swap (74700k free swap), the
> full picture is:
>
>
> 22:51:54 up 3:58, 6 users, load average: 47.38, 18.53, 7.79
> 131 processes: 130 sleeping, 1 running, 0 zombie, 0 stopped
> CPU states: 5.3% user 3.0% system 0.0% nice 0.0% iowait 91.6% idle
> Mem: 384580k av, 210008k used, 174572k free, 0k shrd, 6372k
> buff
> 158748k actv, 14556k in_d, 1412k in_c
> Swap: 265064k av, 190364k used, 74700k free 31356k
> cached
>
> 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

this is really strange. You've got 170Megs free memory, yet are going
into a swapstorm. I had this problem with older kernels under rh7.2
(2.4.7 and 2.4.9) when accessing really large files but they went away
with the latest one I'm running, which is 2.4.20.

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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-01-21 23:51:56 Re: CTTAS w/ DISTINCT ON crashes backend
Previous Message Mike Mascari 2004-01-21 23:34:36 Re: CTTAS w/ DISTINCT ON crashes backend