pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Catalin Iacob <iacobcatalin@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Marko Kreen <markokr@gmail.com>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to keep queries low latency as concurrency increases
Date: Mon, 26 Nov 2012 09:46:33 +0200
Message-ID: <50B31E59.9050004@vmware.com> (raw)
In-Reply-To: <CAHg_5grrAQKEaP+ZVHBOejX_kU90WvPOshd0v28zwxiBiPeEGQ@mail.gmail.com>
References: <CAHg_5goaCywcDuZ7+ko-H7g3Aia4EUrw+Vm1EiVO+EunFn8mog@mail.gmail.com>
	<CAMkU=1zq_pOG19tdq0UGoCNr71ojw5RpqUXXAjwR-K83J9zdTA@mail.gmail.com>
	<CAHyXU0w-DNb9sUD7c3DQpk-zNjt5wtuTHjDVmNwXVuZow6TYBg@mail.gmail.com>
	<CAMkU=1we3-2Y0G7H2xU+Dd92dzDH1ESAY+yHy18HJxHwv0FdQQ@mail.gmail.com>
	<CACMqXCLHjddYi91QiT9bki9vhvQFHd-bVXSR5+yoWTZuo8pPNA@mail.gmail.com>
	<CAMkU=1z_NyKv-jMLC2-Xe5z+H2X-cm2a=8aJgrgUmcDRq6a8Uw@mail.gmail.com>
	<CAHg_5grrAQKEaP+ZVHBOejX_kU90WvPOshd0v28zwxiBiPeEGQ@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 25.11.2012 18:30, Catalin Iacob wrote:
> So it seems we're just doing too many connections and too many
> queries. Each page view from a user translates to multiple requests to
> the application server and each of those translates to a connection
> and at least a few queries (which are done in middleware and therefore
> happen for each and every query). One pgbouncer can handle lots of
> concurrent idle connections and lots of queries/second but our 9000
> queries/second to seem push it too much. The longer term solution for
> us would probably be to do less connections (by doing less Django
> requests for a page) and less queries, before our deadline we were
> just searching for a short term solution to handle an expected traffic
> spike.

The typical solution to that is caching, see 
https://docs.djangoproject.com/en/1.4/topics/cache/.

- Heikki


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (18+ messages)  latest in thread

Message-ID: <50B31E59.9050004@vmware.com>
Permalink:  ../50B31E59.9050004@vmware.com/
Also on:    postgresql.org/message-id/50B31E59.9050004@vmware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: hlinnakangas@vmware.com, iacobcatalin@gmail.com, jeff.janes@gmail.com, markokr@gmail.com, mmoncure@gmail.com
  Subject: Re: How to keep queries low latency as concurrency increases
  In-Reply-To: <50B31E59.9050004@vmware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox