X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 05DB53A1CF0 for ; Mon, 20 Dec 2004 04:47:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88943-02 for ; Mon, 20 Dec 2004 04:47:48 +0000 (GMT) Received: from svarog.thaico.si (p0f.net [193.77.154.190]) by svr1.postgresql.org (Postfix) with ESMTP id E31EC3A1CEE for ; Mon, 20 Dec 2004 04:47:47 +0000 (GMT) Received: from lunik.p0f.net ([192.168.50.128]) by svarog.thaico.si with esmtp (Exim 3.32 #1 (Debian)) id 1CgFSH-00068l-00; Mon, 20 Dec 2004 05:47:33 +0100 Received: from lunik.p0f.net (localhost [127.0.0.1]) by lunik.p0f.net (8.12.10/8.12.10) with ESMTP id iBK4mZSw025214; Mon, 20 Dec 2004 05:48:35 +0100 Received: (from gregab@localhost) by lunik.p0f.net (8.12.10/8.12.10/Submit) id iBK4mZO7025213; Mon, 20 Dec 2004 05:48:35 +0100 Date: Mon, 20 Dec 2004 05:48:35 +0100 From: Grega Bremec To: Theo Galanakis Cc: pgsql-performance@postgresql.org Subject: Re: PG Logging is Slow Message-ID: <20041220044835.GA24979@lunik.p0f.net> References: <16C0CF355FA04944A69E5A4F5299D30B110EAA@ganesh.au.lpint.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline In-Reply-To: <16C0CF355FA04944A69E5A4F5299D30B110EAA@ganesh.au.lpint.net> User-Agent: Mutt/1.4.1i Organization: p0f X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.153 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, RCVD_IN_NJABL_DUL X-Spam-Level: * X-Archive-Number: 200412/243 X-Sequence-Number: 9618 --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =2E..and on Mon, Dec 20, 2004 at 03:17:11PM +1100, Theo Galanakis used the = keyboard: > Under postgres 7.3 logging is incredibly slow! >=20 > I have applied the following settings: >=20 > syslog =3D 2 > syslog_facility =3D 'LOCAL0' > syslog_ident =3D 'postgres' > =20 > log_connections =3D true=20 > log_duration =3D true=20 > log_pid =3D true=20 > log_statement =3D true=20 > log_timestamp =3D true=20 > =20 > This severely impacted the performance of our production system, a search > page which took 1-3 seconds now takes over 30, is this normal? > =20 > I need to get some performance indicators from our production db, however= I > cant turn on logging with such performance degradation. > =20 Hi Theo, One thing you should be sure about is that whichever logfile you have configured for the local0 facility is being written to asynchronously. Synchronous logging is REALLY expensive. If you're using the standard syslogd, you can achieve that by prefixing the filename in syslogd.conf with a dash. For example, local0.* /var/log/postgresql.log would become local0.* -/var/log/postgresql.log One other option would be to turn off syslog logging completely and let postmaster take care of the log on its own, which may or may not be possible for you, depending on the policy in effect (remote logging, etc.). Hope this helped, --=20 Grega Bremec gregab at p0f dot net --d6Gm4EdcadzBjdND Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFBxlmifu4IwuB3+XoRAjgzAJ9lfCTvp0gTnaP7v93GBECPACCU7ACffJZp Xk5D4GaUvLXq1g9zkA5Tt5A= =YRXU -----END PGP SIGNATURE----- --d6Gm4EdcadzBjdND--