X-Original-To: pgsql-general@postgresql.org Received: from commsecure.com.au (CommSecureAustPtyLtd.sb1.optus.net.au [203.202.148.106]) by postgresql.org (Postfix) with ESMTP id C66654758E6 for ; Wed, 12 Mar 2003 18:20:50 -0500 (EST) Received: from ws12.commsecure.com.au (ws12.commsecure.com.au [172.16.15.13]) by commsecure.com.au (8.11.6/8.11.6) with ESMTP id h2CNKSd07514; Thu, 13 Mar 2003 10:20:29 +1100 Subject: Re: Performance Problem From: Stephen Robert Norris To: "scott.marlowe" Cc: Stefan Sturm , pgsql-general@postgresql.org In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-MNyyco7H2NquaFi0td+9" X-Mailer: Ximian Evolution 1.0.8 (1.0.8-10) Date: 13 Mar 2003 10:21:49 +1100 Message-Id: <1047511310.9664.2.camel@ws12.commsecure.com.au> Mime-Version: 1.0 X-Archive-Number: 200303/620 X-Sequence-Number: 39112 --=-MNyyco7H2NquaFi0td+9 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 2003-03-13 at 04:28, scott.marlowe wrote: > On Wed, 12 Mar 2003, Stefan Sturm wrote: >=20 > > Hello, > >=20 > > we have a performance problem with PostgreSQL 7.2.4. But first I try to > > explain our situation: > >=20 > > We have an online game. This game is a fantasy game, where you can buy > > and sell players for your team. > > All players for the teams are stored in one table. So in this table we > > have just one primary key and to foreign keys. > > When we have around 500 Users at one time on the maschine, the game is > > slowing down(Time for one spage up to 1minute and more). And I think > > the problem is this table. There are a lot of reading and writing > > connections to this table. > >=20 > > So now my question: What can I do to increase the performance?=20 >=20 > Hi Stefan, the first step to increasing performance is surveying the=20 > current situation. When the machine starts to slow down, what does the= =20 > output of top look like? Is the machine running out of any resources lik= e=20 > file handles or memory? Note that most flavors of unix will not show a= =20 > lot of memory free they will show it being used as cache. If your machin= e=20 > shows 400 megs of system cache and postgresql is using 4 megs of shared= =20 > memory, you aren't giving enough to postgresql. It'll go slow. To add to what Scott says, what does vmstat report (are you swapping?). If you're not already, install sar and see how much I/O and CPU you're consuming - one important issue is whether you're running out of I/O capacity or CPU or RAM. Stephen --=-MNyyco7H2NquaFi0td+9 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQA+b8ENFdZzflHhqBIRAp0aAJ9OPxXLudJSVXCBHQwOaRmtLE8lCACeOtok w41LxlY68vCmbjna5Wo32Lo= =Ymoh -----END PGP SIGNATURE----- --=-MNyyco7H2NquaFi0td+9--