Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 5EA7B1337BE0 for ; Thu, 7 Oct 2010 16:00:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 98102-05 for ; Thu, 7 Oct 2010 19:00:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tamriel.snowman.net (tamriel.snowman.net [72.66.115.51]) by mail.postgresql.org (Postfix) with ESMTP id CFF771337BD4 for ; Thu, 7 Oct 2010 16:00:06 -0300 (ADT) Received: by tamriel.snowman.net (Postfix, from userid 1000) id B790822941; Thu, 7 Oct 2010 15:00:06 -0400 (EDT) Date: Thu, 7 Oct 2010 15:00:06 -0400 From: Stephen Frost To: Aaron Turner Cc: pgsql-performance Subject: Re: large dataset with write vs read clients Message-ID: <20101007190006.GA26232@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6YFfOQ1DNaZEJxLS" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.6.26-1-amd64 (x86_64) X-Uptime: 14:57:58 up 406 days, 6:22, 14 users, load average: 0.16, 0.13, 0.09 User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/64 X-Sequence-Number: 40483 --6YFfOQ1DNaZEJxLS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Aaron Turner (synfinatic@gmail.com) wrote: > The graphing front end CGI is all SELECT. There's 12k tables today, > and new tables are created each month. =20 That's a heck of alot of tables.. Probably more than you really need. Not sure if reducing that number would help query times though. > The number of rows per table > is 100-700k, with most in the 600-700K range. 190GB of data so far. > Good news is that queries have no joins and are limited to only a few > tables at a time. Have you got indexes and whatnot on these tables? > Basically, each connection is taking about 100MB resident. As we need > to increase the number of threads to be able to query all the devices > in the 5 minute window, we're running out of memory. There aren't > that many CGI connections at anyone one time, but obviously query > performance isn't great, but honestly is surprisingly good all things > considered. I'm kind of suprised at each connection taking 100MB, especially ones which are just doing simple inserts. Thanks, Stephen --6YFfOQ1DNaZEJxLS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkyuGLYACgkQrzgMPqB3kijd1wCfajSEegvQrrHk1l0B7JqABwqW W7cAoJIWrXa1bY8egsaXSpAdpCJOCKfd =Zhan -----END PGP SIGNATURE----- --6YFfOQ1DNaZEJxLS--