Re: High CPU Load

From: Jérôme BENOIS <benois(at)argia-engineering(dot)fr>
To: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: High CPU Load
Date: 2006-09-18 14:30:51
Message-ID: 1158589852.5665.57.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi Guillaume,

Now i disable Hyper Threading in BIOS, and "context switch storms"
disappeared. (when i look with command sar -t)

I decreased work_mem parameter to 32768. My CPU load is better. But it
is still too high, in example :

top - 16:27:05 up 9:13, 3 users, load average: 45.37, 43.43, 41.43
Tasks: 390 total, 26 running, 363 sleeping, 0 stopped, 1 zombie
Cpu(s): 89.5% us, 9.8% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.2% hi,
0.4% si
Mem: 2076404k total, 2039552k used, 36852k free, 40412k buffers
Swap: 1954312k total, 468k used, 1953844k free, 1232000k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
30907 postgres 16 0 537m 51m 532m R 20.4 2.5 1:44.73 postmaster
25631 postgres 16 0 538m 165m 532m R 17.4 8.2 8:43.76 postmaster
29357 postgres 16 0 537m 311m 532m R 17.4 15.3 0:26.47 postmaster
32294 postgres 16 0 535m 86m 532m R 14.9 4.3 0:04.97 postmaster
31406 postgres 16 0 536m 180m 532m R 14.4 8.9 0:22.04 postmaster
31991 postgres 16 0 535m 73m 532m R 14.4 3.6 0:08.21 postmaster
30782 postgres 16 0 536m 205m 532m R 14.0 10.1 0:19.63 postmaster

Tomorrow morning i plan to add 2Go RAM in order to test difference with
my actual config.

Have you another ideas ?

Best Regards,
--
Jérôme,

python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'sioneb(at)gnireenigne-aigra(dot)rf'.split('@')])"

Le vendredi 15 septembre 2006 à 00:24 +0200, Guillaume Smet a écrit :
> On 9/14/06, Jérôme BENOIS <benois(at)argia-engineering(dot)fr> wrote:
> > Yes i have a lot of users ;-)
>
> So your work_mem is probably far too high (that's what I told you in
> my first message) and you probably swap when you have too many users.
> Remember that work_mem can be used several times per query (and it's
> especially the case when you have a lot of sorts).
> When your load is high, check your swap activity and your io/wait. top
> gives you these information. If you swap, lower your work_mem to 32 MB
> for example then see if it's enough for your queries to run fast (you
> can check if there are files created in the $PGDATA/base/<your
> database oid>/pg_tmp) and if it doesn't swap. Retry with a
> lower/higher value to find the one that fits best to your queries and
> load.
>
> > I agree but by moment DB Server is so slow.
>
> Yep, that's the information that was missing :).
>
> > what's means "HT" please ?
>
> Hyper threading. It's usually not recommended to enable it on
> PostgreSQL servers. On most servers, you can disable it directly in
> the BIOS.
>
> --
> Guillaume
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bucky Jordan 2006-09-18 14:37:58 Large tables (was: RAID 0 not as fast as expected)
Previous Message Guido Neitzer 2006-09-18 08:50:43 Re: Poor performance on seq scan