Re: Usage up to 50% CPU

From: Shane Ambler
Subject: Re: Usage up to 50% CPU
Date: ,
Msg-id: 4631C825.9000705@Sheeky.Biz
(view: Whole thread, Raw)
In response to: Re: Usage up to 50% CPU  (Magnus Hagander)
Responses: Re: Usage up to 50% CPU  (Michael Stone)
List: pgsql-performance

Tree view

Usage up to 50% CPU  ("Andres Retzlaff", )
 Re: Usage up to 50% CPU  (Magnus Hagander, )
  Re: Usage up to 50% CPU  ("Andres Retzlaff", )
   Re: Usage up to 50% CPU  (Magnus Hagander, )
    Re: Usage up to 50% CPU  (Shane Ambler, )
     Re: Usage up to 50% CPU  (Michael Stone, )
      Re: Usage up to 50% CPU  ("Andres Retzlaff", )

Magnus Hagander wrote:
> On Fri, Apr 27, 2007 at 08:10:48AM +0000, Andres Retzlaff wrote:
>> Hi Magnus,
>>
>> in this case each CPU goes up to 50%, giveing me 50% total usage. I was
>> specting as you say 1 query 100% cpu.
>>
>> Any ideas?
>
> No. 1 query will only use 100% of *one* CPU, which means 50% total usage.
> You need at least one query per CPU to reach full 100% of the whole system.
> (Actually, you can get slightly above 50% since the query will run on one
> CPU and the OS and autovacuum and bgwriter can run on the other. But it's
> marginally)
>
> //Magnus

I would think that as you are sitting and watching the cpu usage, your
query would seem to taking a while to run, leading me to wonder if you
are getting a full table scan that is causing pg to wait for disk response?

Or are you running a long list of steps that take a while?



--

Shane Ambler


Get Sheeky @ http://Sheeky.Biz


pgsql-performance by date:

From: Michael Stone
Date:
Subject: Re: Feature Request --- was: PostgreSQL Performance Tuning
From: "Siddharth Anand"
Date:
Subject: [Fwd: ] How