pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedUsage up to 50% CPU
7+ messages / 4 participants
[nested] [flat]
* Usage up to 50% CPU
@ 2007-04-27 04:43 Andres Retzlaff <andres_retzlaff@hotmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Andres Retzlaff @ 2007-04-27 04:43 UTC (permalink / raw)
To: pgsql-performance
Hi,
I have pg 8.1.4 running in
Windows XP Pro
wirh a Pentium D
and I notice that I can not use more than 50% of the cpus (Pentium D has 2
cpus), how can I change the settings to use the 100% of it.
Regards,
Andrew Retzlaff
_________________________________________________________________
Advertisement: Visit LetsShop.com to WIN Fabulous Books Weekly
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fwww%2Eletsshop%2Ecom%2FLetsShopBookClub%2Ftabid%2F86...
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Usage up to 50% CPU
@ 2007-04-27 08:06 Magnus Hagander <magnus@hagander.net>
parent: Andres Retzlaff <andres_retzlaff@hotmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Magnus Hagander @ 2007-04-27 08:06 UTC (permalink / raw)
To: Andres Retzlaff <andres_retzlaff@hotmail.com>; +Cc: pgsql-performance
On Fri, Apr 27, 2007 at 04:43:06AM +0000, Andres Retzlaff wrote:
> Hi,
>
> I have pg 8.1.4 running in
> Windows XP Pro
> wirh a Pentium D
>
> and I notice that I can not use more than 50% of the cpus (Pentium D has 2
> cpus), how can I change the settings to use the 100% of it.
A single query will only use one CPU. If you have multiple parallell
clients, they will use the differnt CPUs.
//Magnus
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Usage up to 50% CPU
@ 2007-04-27 08:10 Andres Retzlaff <andres_retzlaff@hotmail.com>
parent: Magnus Hagander <magnus@hagander.net>
0 siblings, 1 reply; 7+ messages in thread
From: Andres Retzlaff @ 2007-04-27 08:10 UTC (permalink / raw)
To: magnus@hagander.net; +Cc: pgsql-performance
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?
Andrew
On Fri, Apr 27, 2007 at 04:43:06AM +0000, Andres Retzlaff wrote:
> Hi,
>
> I have pg 8.1.4 running in
> Windows XP Pro
> wirh a Pentium D
>
> and I notice that I can not use more than 50% of the cpus (Pentium D has
2
> cpus), how can I change the settings to use the 100% of it.
A single query will only use one CPU. If you have multiple parallell
clients, they will use the differnt CPUs.
//Magnus
_________________________________________________________________
Advertisement: Its simple! Sell your car for just $30 at carsales.com.au
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fc...
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Usage up to 50% CPU
@ 2007-04-27 08:13 Magnus Hagander <magnus@hagander.net>
parent: Andres Retzlaff <andres_retzlaff@hotmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Magnus Hagander @ 2007-04-27 08:13 UTC (permalink / raw)
To: Andres Retzlaff <andres_retzlaff@hotmail.com>; +Cc: pgsql-performance
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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Usage up to 50% CPU
@ 2007-04-27 09:53 Shane Ambler <pgsql@Sheeky.Biz>
parent: Magnus Hagander <magnus@hagander.net>
0 siblings, 1 reply; 7+ messages in thread
From: Shane Ambler @ 2007-04-27 09:53 UTC (permalink / raw)
To: Magnus Hagander <magnus@hagander.net>; +Cc: Andres Retzlaff <andres_retzlaff@hotmail.com>; pgsql-performance
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
pgSQL@Sheeky.Biz
Get Sheeky @ http://Sheeky.Biz
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Usage up to 50% CPU
@ 2007-04-27 12:52 Michael Stone <mstone+postgres@mathom.us>
parent: Shane Ambler <pgsql@Sheeky.Biz>
0 siblings, 1 reply; 7+ messages in thread
From: Michael Stone @ 2007-04-27 12:52 UTC (permalink / raw)
To: pgsql-performance
On Fri, Apr 27, 2007 at 07:23:41PM +0930, Shane Ambler wrote:
>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?
If so, you probably wouldn't be seeing that much cpu usage... (if the
cpu is waiting for disk it's idling)
Mike Stone
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Usage up to 50% CPU
@ 2007-04-28 19:28 Andres Retzlaff <andres_retzlaff@hotmail.com>
parent: Michael Stone <mstone+postgres@mathom.us>
0 siblings, 0 replies; 7+ messages in thread
From: Andres Retzlaff @ 2007-04-28 19:28 UTC (permalink / raw)
To: mstone+postgres@mathom.us; +Cc: pgsql-performance
>On Fri, Apr 27, 2007 at 07:23:41PM +0930, Shane Ambler wrote:
>>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?
>If so, you probably wouldn't be seeing that much cpu usage... (if the cpu
>is waiting for disk it's >idling)
>Mike Stone
Yes, I notice 3 steeps:
1) the CPU is at 100% (of 1 cpu)
2) the HDD is 100% but no much of the cpu
3) I get the query display
I will see what can I do to improved the speed. At this moment is taking 10
sec to get the responce.
Regards,
Andrew Retzlaff
_________________________________________________________________
Advertisement: Its simple! Sell your car for just $30 at carsales.com.au
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fc...
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2007-04-28 19:28 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-04-27 04:43 Usage up to 50% CPU Andres Retzlaff <andres_retzlaff@hotmail.com>
2007-04-27 08:06 ` Magnus Hagander <magnus@hagander.net>
2007-04-27 08:10 ` Andres Retzlaff <andres_retzlaff@hotmail.com>
2007-04-27 08:13 ` Magnus Hagander <magnus@hagander.net>
2007-04-27 09:53 ` Shane Ambler <pgsql@Sheeky.Biz>
2007-04-27 12:52 ` Michael Stone <mstone+postgres@mathom.us>
2007-04-28 19:28 ` Andres Retzlaff <andres_retzlaff@hotmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox