pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jérôme BENOIS <benois@argia-engineering.fr>
To: Guillaume Smet <guillaume.smet@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: High CPU Load
Date: Mon, 18 Sep 2006 16:30:51 +0200
Message-ID: <1158589852.5665.57.camel@localhost.localdomain> (raw)
In-Reply-To: <1d4e0c10609141524j3532e140i308111908c1ab437@mail.gmail.com>
References: <004001c6d80e$bdef5bc0$8300a8c0@tridecap.com>
	<1158249411.24726.17.camel@state.g2switchworks.com>
	<1158268058.5167.2.camel@localhost.localdomain>
	<1d4e0c10609141422o57ecf28eobf3d0b7594bb242f@mail.gmail.com>
	<1158270523.5167.18.camel@localhost.localdomain>
	<1d4e0c10609141524j3532e140i308111908c1ab437@mail.gmail.com>

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@gnireenigne-aigra.rf'.split('@')])"

Le vendredi 15 septembre 2006 à 00:24 +0200, Guillaume Smet a écrit :
> On 9/14/06, Jérôme BENOIS <benois@argia-engineering.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@postgresql.org so that your
>        message can get through to the mailing list cleanly
> 

Attachments:

  signature.asc (application/pgp-signature, 190B) download

view thread (30+ messages)  latest in thread

Message-ID: <1158589852.5665.57.camel@localhost.localdomain>
Permalink:  ../1158589852.5665.57.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1158589852.5665.57.camel@localhost.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: benois@argia-engineering.fr, guillaume.smet@gmail.com
  Subject: Re: High CPU Load
  In-Reply-To: <1158589852.5665.57.camel@localhost.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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