Skip site navigation (1) Skip section navigation (2)

Re: High CPU Load

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Jérôme BENOIS <benois(at)argia-engineering(dot)fr>
Cc: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: High CPU Load
Date: 2006-09-14 14:17:24
Message-ID: 1158243444.24726.10.camel@state.g2switchworks.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Thu, 2006-09-14 at 09:00, Jérôme BENOIS wrote:
> Hi Guillaume,
> 
> Le jeudi 14 septembre 2006 à 15:46 +0200, Guillaume Smet a écrit :
> > On 9/14/06, Jérôme BENOIS <benois(at)argia-engineering(dot)fr> wrote:
> > >    I migrated Postgres server from 7.4.6 to 8.1.4, But my server is
> > > completely full, by moment load average > 40
> > >         All queries analyzed by EXPLAIN, all indexes are used .. IO is good ...
> > 
> > What is the bottleneck? Are you CPU bound? Do you have iowait? Do you
> > swap? Any weird things in vmstat output?
> the load average goes up and goes down between 1 and 70, it's strange.
> IO wait and swap are good. I have just very high CPU load. And it's user
> land time.
> 
> top output : 
> 
> top - 15:57:57 up 118 days,  9:04,  4 users,  load average: 8.16, 9.16,
> 15.51
> Tasks: 439 total,   7 running, 432 sleeping,   0 stopped,   0 zombie
> Cpu(s): 87.3% us,  6.8% sy,  0.0% ni,  4.8% id,  0.1% wa,  0.2% hi,
> 0.8% si
> Mem:   2076404k total,  2067812k used,     8592k free,    13304k buffers
> Swap:  1954312k total,      236k used,  1954076k free,  1190296k cached
> 
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 15667 postgres  25   0  536m 222m 532m R 98.8 11.0   1:39.29 postmaster
> 19533 postgres  25   0  535m 169m 532m R 92.9  8.3   0:38.68 postmaster
> 16278 postgres  25   0  537m 285m 532m R 86.3 14.1   1:37.56 postmaster
> 18695 postgres  16   0  535m 171m 532m S 16.1  8.5   0:14.46 postmaster
> 18092 postgres  16   0  544m 195m 532m R 11.5  9.7   0:31.87 postmaster
> 16896 postgres  15   0  534m 215m 532m S  6.3 10.6   0:27.13 postmaster

Somewhere, the query planner is likely making a really bad decision.

Have you analyzed your dbs?

In response to

pgsql-performance by date

Next:From: Joshua MarshDate: 2006-09-14 14:18:30
Subject: Re: Performance With Joins on Large Tables
Previous:From: Jérôme BENOISDate: 2006-09-14 14:17:15
Subject: Re: High CPU Load

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group