Re: Extremely high CPU usage when building tables

From: Rajesh Kumar Mallah <mallah(dot)rajesh(at)gmail(dot)com>
To: Deborah Fuentes <dfuentes(at)eldocomp(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Extremely high CPU usage when building tables
Date: 2010-07-01 09:49:49
Message-ID: AANLkTikyK6EtgIinzPIOwhokGJvR1Oq_fsHrUzA-k2we@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

1. Did you also check vmstat output , from sar output the i/o wait is not
clear.
2. i gues you must be populating the database between creating tables and
creating
indexes. creating indexes require sorting of data that may be cpu
intensive, loading/populating
the data may saturate the i/o bandwidth . I think you should check when
the max cpu utilisation
is taking place exactly.

regds
Rajesh Kumar Mallah.

On Sat, Jun 26, 2010 at 3:55 AM, Deborah Fuentes <dfuentes(at)eldocomp(dot)com>wrote:

> Hello,
>
> When I run an SQL to create new tables and indexes is when Postgres
> consumes all CPU and impacts other users on the server.
>
> We are running Postgres 8.3.7 on a Sun M5000 with 2 x quad core CPUs (16
> threads) running Solaris 10.
>
> I've attached the sar data at the time of the run- here's a snip-it below.
>
> Any ideas would be greatly appreciated.
>
> Thanks!
> Deb
>
> ****************************************************
>
> Here, note the run queue, the left column. That is the number of processes
> waiting to run. 97 processes waiting to run at any time with only eight CPU
> cores looks very busy.
>
> root(at)core2 # sar -q 5 500
>
> SunOS core2 5.10 Generic_142900-11 sun4u 06/17/2010
>
> 12:01:50 runq-sz %runocc swpq-sz %swpocc
> 12:01:55 1.8 80 0.0 0
> 12:02:00 1.0 20 0.0 0
> 12:02:05 1.0 20 0.0 0
> 12:02:10 0.0 0 0.0 0
> 12:02:15 0.0 0 0.0 0
> 12:02:21 3.3 50 0.0 0
> 12:02:26 1.0 20 0.0 0
> 12:02:31 1.0 60 0.0 0
> 12:02:36 1.0 20 0.0 0
> 12:02:42 27.0 50 0.0 0
> 12:02:49 32.8 83 0.0 0
> 12:02:55 76.0 100 0.0 0
> 12:03:01 66.1 100 0.0 0
> 12:03:07 43.8 100 0.0 0
> 12:03:13 52.0 100 0.0 0
> 12:03:19 91.2 100 0.0 0
> 12:03:26 97.8 83 0.0 0
> 12:03:33 63.7 100 0.0 0
> 12:03:39 67.4 100 0.0 0
> 12:03:47 41.5 100 0.0 0
> 12:03:53 82.0 83 0.0 0
> 12:03:59 88.7 100 0.0 0
> 12:04:06 87.7 50 0.0 0
> 12:04:12 41.3 100 0.0 0
> 12:04:17 94.3 50 0.0 0
> 12:04:22 1.0 20 0.0 0
> 12:04:27 3.3 60 0.0 0
> 12:04:32 1.0 20 0.0 0
> 12:04:38 0.0 0 0.0 0
>
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2010-07-01 10:00:01 Re: PostgreSQL as a local in-memory cache
Previous Message Rajesh Kumar Mallah 2010-07-01 09:41:10 how to (temporarily) disable/minimize benefits of disk block cache or postgresql shared buffer