X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 7DBAA9FB2C6 for ; Mon, 18 Sep 2006 11:44:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 98279-05 for ; Mon, 18 Sep 2006 14:44:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail2.argia.fr (mail2.argia.fr [213.218.131.70]) by postgresql.org (Postfix) with SMTP id 9D83F9FB2B3 for ; Mon, 18 Sep 2006 11:44:07 -0300 (ADT) Received: (qmail 2818 invoked by uid 503); 18 Sep 2006 14:44:05 -0000 Received: from lewebquivabien.leroymerlin.fr (HELO ?10.16.134.247?) (195.25.212.55) by mail2.argia.fr with SMTP; 18 Sep 2006 14:44:05 -0000 Subject: Re: High CPU Load From: =?ISO-8859-1?Q?J=E9r=F4me?= BENOIS To: Markus Schaber Cc: pgsql-performance@postgresql.org In-Reply-To: <450A75DE.6050102@logix-tt.com> References: <1158239339.5226.17.camel@localhost.localdomain> <450A75DE.6050102@logix-tt.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-leCzUVE2ILNq90Id+UaV" Date: Mon, 18 Sep 2006 16:44:05 +0200 Message-Id: <1158590646.5665.71.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200609/230 X-Sequence-Number: 20916 --=-leCzUVE2ILNq90Id+UaV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Markus, Le vendredi 15 septembre 2006 =C3=A0 11:43 +0200, Markus Schaber a =C3=A9cr= it : > Hi, J=C3=A9r=C3=B4me, >=20 > J=C3=A9r=C3=B4me BENOIS wrote: >=20 > > max_connections =3D 512 >=20 > Do you really have that much concurrent connections? Then you should > think about getting a larger machine, probably. >=20 > You will definitely want to play with commit_delay and commit_siblings > settings in that case, especially if you have write access. >=20 > > work_mem =3D 65536 > > effective_cache_size =3D 131072 >=20 > hmm, 131072*8*1024 + 512*65536*1024 =3D 35433480192 - thats 33 Gig of > Memory you assume here, not counting OS usage, and the fact that certain > queries can use up a multiple of work_mem. Now i Have 335 concurrent connections, i decreased work_mem parameter to 32768 and disabled Hyper Threading in BIOS. But my CPU load is still very important. Tomorrow morning i plan to add 2Giga RAM ... But I don't understand why my database server worked good with previous version of postgres and same queries ... > Even on amachine that big, I'd be inclined to dedicate more memory to > caching, and less to the backends, unless specific needs dictate it. You > could try to use sqlrelay or pgpool to cut down the number of backends > you need. I used already database pool on my application and when i decrease number of connection my application is more slow ;-( >=20 > > My Server is Dual Xeon 3.06GHz >=20 > For xeons, there were rumours about "context switch storms" which kill > performance. I disabled Hyper Threading. > > with 2 Go RAM and good SCSI disks. >=20 > For 2 Gigs of ram, you should cut down the number of concurrent backends. >=20 > Does your machine go into swap? No, 0 swap found and i cannot found pgsql_tmp files in $PG_DATA/base/... >=20 > Markus --=20 J=C3=A9r=C3=B4me, python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in 'sioneb@gnireenigne-aigra.rf'.split('@')])" --=-leCzUVE2ILNq90Id+UaV Content-Type: application/pgp-signature; name=signature.asc Content-Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBFDrC1CDKlmlhpwnERAuTDAJ9ssWqzEc+vriT4nnOILwR2IytyMgCfUPwY C/q9/JrM1aSNv0HMyGIIi4I= =eIcw -----END PGP SIGNATURE----- --=-leCzUVE2ILNq90Id+UaV--