X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 6763730F8F7 for ; Tue, 24 Jun 2003 11:33:57 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 02144-07 for ; Tue, 24 Jun 2003 08:33:46 -0300 (ADT) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by svr1.postgresql.org (Postfix) with ESMTP id 503D530F722 for ; Tue, 24 Jun 2003 08:33:46 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 19Um3V-00026i-0V; Tue, 24 Jun 2003 12:33:46 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 3E27217464; Tue, 24 Jun 2003 12:33:45 +0100 (BST) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 9534717454; Tue, 24 Jun 2003 12:33:44 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: , Subject: Re: Performance advice Date: Tue, 24 Jun 2003 12:33:42 +0100 User-Agent: KMail/1.4.3 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200306241233.42361.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Archive-Number: 200306/140 X-Sequence-Number: 2224 On Tuesday 24 Jun 2003 8:39 am, Michael Mattox wrote: > I'd like to get some feedback on my setup to see if I can optimize my > database performance. My application has two separate applications: > > The first application connects to websites and records the statistics in > the database. Websites are monitored every 5 or 10 minutes (depends on > client), there are 900 monitors which comes out to 7,800 monitorings per > hour.=20=20 [snip] > There is a serious > performance constraint here because unlike a webserver, this application > cannot slow down. If it slows down, we won't be able to monitor our sites > at 5 minute intervals which will make our customers unhappy. Others are discussing the performance/tuning stuff, but can I make one=20 suggestion? Don't log your monitoring info directly into the database, log straight to = one=20 or more text-files and sync them every few seconds. Rotate the files once a= =20 minute (or whatever seems suitable). Then have a separate process that read= s=20 "old" files and processes them into the database. The big advantage - you can take the database down for a short period and t= he=20 monitoring goes on. Useful for those small maintenance tasks. --=20 Richard Huxton