Received: from dmz2.unibox.ptinovacao.pt (unibox.ptinovacao.pt [194.65.138.76]) by postgresql.org (Postfix) with ESMTP id 7C64B475AE9 for ; Tue, 23 Jul 2002 15:18:21 -0400 (EDT) Received: from uniboxow.ptinovacao.pt ([10.80.50.202]) by dmz2.unibox.ptinovacao.pt (8.9.3/8.9.3) with SMTP id TAA22955 for ; Tue, 23 Jul 2002 19:48:18 +0100 Received: (qmail 26067 invoked by uid 0); 23 Jul 2002 19:15:09 -0000 Received: from unknown (HELO sargao) ([unknown]) (envelope-sender ) by unknown (qmail-ldap-1.03) with SMTP for ; 23 Jul 2002 19:15:09 -0000 Subject: Re: Postgres performance slowly gets worse over a month From: Marcos Garcia To: "Robert M. Meyer" Cc: pgsql-admin In-Reply-To: <1027448992.25561.25.camel@skymaster> References: <4.2.2.20020723110231.01daf8c0@ecint.ecinet.com> <1027448992.25561.25.camel@skymaster> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-mXoUwsZRTY9aiqcu7nGq" X-Mailer: Ximian Evolution 1.0.8 Date: 23 Jul 2002 19:18:02 +0100 Message-Id: <1027448282.15044.24.camel@sargao> Mime-Version: 1.0 X-Archive-Number: 200207/326 X-Sequence-Number: 5010 --=-mXoUwsZRTY9aiqcu7nGq Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have the same problem. My database is getting slower and slower. I realized that the disk space used by the database is also increasing and for me this is the reason for the bad performance. what i have tryed: - vacuumdb 4 times per day - drop and create the indexes=20 The only solution I know is to make a dump and a restore. In my case i can't stop my service, but i'm forced to do it. To check that the problem wasn't in my code i made the following test: ------------------------------ AUTOCOMMIT =3D 1 FOR 1 to 120000{ INSERT RECORD UPDATE RECORD } =20=20 DELETE ALL INSERTED RECORDS ------------------------------ I have run this test program several times and after each time i have run the vacummdb. What i have realized is that every time i run this program the database is growing and growing and running the vacummdb only recovers some space. How can this problem be solved??? Thanks, M.P.Garcia On Tue, 2002-07-23 at 19:29, Robert M. Meyer wrote: > Well, we're running a hardware, three disk RAID5, on an > sym53c896-0-<2,*>: FAST-20 WIDE SCSI 40.0 MB/s interface. This is a > Compaq 3500 system with a CR3500 raid controller. An md5sum of a 1.2Gig > file takes less than two minutes. >=20 > We tried rebuilding the indices but that didn't seem to help. We had an > outside consultant do the rebuild and he's not available now so I don't > know what command he ran to do it. >=20 > I've never used 'sar'. If you can believe it, I've been poking around > with Unix for the last 20 years and I've never even seen the 'man' page > for 'sar'. I probably should look into it. What flags would give me > the most information to help figger out what's going on here? >=20 > Of course the troubleshooting increment is going to be a month or more > so this will probably take some time to resolve :-) >=20 > Cheers! >=20 > Bob >=20 >=20 > On Tue, 2002-07-23 at 14:08, Naomi Walker wrote: > >=20 > > >Nightly, we're doing a 'vacuumdb -a -z' after stopping and restarting > > >the database. The performance will get so bad after a month that we > > >start to see load spikes in excess of 30. Normally, we don't see load > > >over 2.5 during the heaviest activity and generally less than 1.0 most > > >of the time. > > Typically, performance is linked to your I/O, but my first guess in thi= s=20 > > case has to do with your indices. As a test, next time performance get= s=20 > > really rotten, drop your indicies and rebuild them. It cannot hurt, and= =20 > > might just help. > >=20 > > The trick here is to see what is happening while it is tanking. What d= oes=20 > > your disk configuration look like? Is it a raid or stripe where reads = are=20 > > spread out among more than one controller? Do sar reports point to=20 > > anything in particular? > >=20 > > -----------------------------------------------------------------------= -----=20 > > ---------------------------------- > > Naomi Walker > > Eldorado Computing, Inc > > Chief Information Officer > > nwalker@eldocomp.com > > 602-604-3100 x242 > >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 > >=20 > --=20 > Robert M. Meyer > Sr. Network Administrator > DigiVision Satellite Services > 14 Lafayette Sq, Ste 410 > Buffalo, NY 14203-1904 > (716)332-1451 >=20 >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 3: 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 --=20 M.P.Garcia PT Inova=E7=E3o, SA Servi=E7os e Redes M=F3veis=20 Rua Jos=E9 Ferreira Pinto Basto - 3810 Aveiro Tel: 234 403 253 - Fax: 234 424 160 E-mail: marcos-p-garcia@ptinovacao.pt --=-mXoUwsZRTY9aiqcu7nGq Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQA9PZ3aGRIrLqlAVg0RAv7FAJ9+YCka1IkXpgMEF2d3MK6HgJqWVgCfbUFz 6WpEB8cIIxcG/CDNDKqBQyU= =mo/F -----END PGP SIGNATURE----- --=-mXoUwsZRTY9aiqcu7nGq--