Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 5CEDF185C946 for ; Sat, 14 Jul 2012 06:50:22 -0300 (ADT) Received: from mail-wg0-f49.google.com ([74.125.82.49]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SpyzP-0000mM-GR for pgsql-performance@postgresql.org; Sat, 14 Jul 2012 09:50:21 +0000 Received: by wgbez12 with SMTP id ez12so2564035wgb.30 for ; Sat, 14 Jul 2012 02:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8PwGJ2Z9m2Ht8yXChxCS1pc97Op+k6f+2jIe3qYM2ik=; b=myybDi9xBJamN80hWCTWPa5HZQJBohmtZwkY/j5ZBBzyjNPEk/Gv3PpFqrF4rgnu0M qtE97Ns5wnpuymMrgHkymgq2AH1ZrNuCxrTvIgvwX/1edDA3mBq8W5uYc8tRXtYs/MRy +sjSXBCb64LSt5vaa7Mmx76cj7FDlRYGcsn3SSZ5yPxm/ad7wtoUACrD8ty0H7htmVR7 /2cKAqAw0YtHETHJXixMK+WqcKzoAti+qj5/AmVahtsZavAtqcISp12F8zQKrP/hEE7V d/Qi0xc1jl11tbnhOTzn9b+wQxom8p2iGzosPfMu8Sq3MurbXl7s2q7/c80bFowbBDmh 22ag== MIME-Version: 1.0 Received: by 10.180.100.133 with SMTP id ey5mr4351177wib.4.1342259401671; Sat, 14 Jul 2012 02:50:01 -0700 (PDT) Received: by 10.194.34.161 with HTTP; Sat, 14 Jul 2012 02:50:01 -0700 (PDT) Received: by 10.194.34.161 with HTTP; Sat, 14 Jul 2012 02:50:01 -0700 (PDT) In-Reply-To: <50013279.4090407@ringerc.id.au> References: <50013279.4090407@ringerc.id.au> Date: Sat, 14 Jul 2012 15:20:01 +0530 Message-ID: Subject: Re: Any tool/script available which can be used to measure scalability of an application's database. From: B Sreejith To: Craig Ringer Cc: "sreejith. balakrishnan" , pgsql-performance@postgresql.org, Robert Klemme Content-Type: multipart/alternative; boundary=f46d0444ee27d5436604c4c71e6e X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201207/186 X-Sequence-Number: 47367 --f46d0444ee27d5436604c4c71e6e Content-Type: text/plain; charset=ISO-8859-1 Dear All, Thanks alot for all the invaluable comments. Regards, Sreejith. On Jul 14, 2012 2:19 PM, "Craig Ringer" wrote: > On 07/14/2012 09:26 AM, B Sreejith wrote: > > Dear Robert, > > We need to scale up both size and load. > Could you please provide steps I need to follow. > > > For load, first you need to build a representative sample of your > application's querying patterns by logging queries and analysing the logs. > Produce a load generator based on that data, set up a test copy of your > database, and start pushing the query rate up to see what happens. > > For simpler loads you can write a transaction script for pgbench based on > your queries. > > For size: Copy your data set, then start duplicating it with munged > copies. Repeat, then use the load generator you wrote for the first part to > see how scaling the data up affects your queries. See if anything is > unacceptably slow (the "auto_explain" module is useful here) and examine it. > > The truth is that predicting how complex database driven apps will scale > is insanely hard, because access patterns change as data sizes and user > counts grow. You're likely to land up tuning for a scenario that's quite > different to the one that you actually face when you start hitting scaling > limitations. This doesn't mean you should not investigate, it just means > your trials don't prove anything and the optimisations you make based on > what you learn may not gain you much. > > -- > Craig Ringer > --f46d0444ee27d5436604c4c71e6e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Dear All,
Thanks alot for all the invaluable comments.
Regards,
=A0 Sreejith.

On Jul 14, 2012 2:19 PM, "Craig Ringer"= ; <ringerc@ringerc.id.au>= ; wrote:
=20 =20 =20
On 07/14/2012 09:26 AM, B Sreejith wrote:
=20

Dear Robert,

We need to scale up both size and load.
Could you please provide steps I need to follow.


For load, first you need to build a representative sample of your application's querying patterns by logging queries and analysing th= e logs. Produce a load generator based on that data, set up a test copy of your database, and start pushing the query rate up to see what happens.

For simpler loads you can write a transaction script for pgbench based on your queries.

For size: Copy your data set, then start duplicating it with munged copies. Repeat, then use the load generator you wrote for the first part to see how scaling the data up affects your queries. See if anything is unacceptably slow (the "auto_explain" module is u= seful here) and examine it.

The truth is that predicting how complex database driven apps will scale is insanely hard, because access patterns change as data sizes and user counts grow. You're likely to land up tuning for a scenari= o that's quite different to the one that you actually face when you start hitting scaling limitations. This doesn't mean you should not investigate, it just means your trials don't prove anything and the optimisations you make based on what you learn may not gain you much.

--
Craig Ringer
--f46d0444ee27d5436604c4c71e6e--