pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: B Sreejith <bsreejithin@gmail.com>
Cc: Sergey Konoplev <gray.ru@gmail.com>
Cc: pgsql-performance@postgresql.org, "sreejith. balakrishnan" <sreejith.balakrishnan@tcs.com>
Subject: Re: Any tool/script available which can be used to measure scalability of an application's database.
Date: Sat, 14 Jul 2012 13:05:54 +0800
Message-ID: <5000FE32.2000909@ringerc.id.au> (raw)
In-Reply-To: <CANVt3iaeej7SSkeUDKJyg49XZy6t49Z0_vCmkGe_nY9VfSm_qw@mail.gmail.com>
References: <OF43A6984C.A368D80E-ON65257A37.00211A41-65257A37.002DEE2E@tcs.com>
	<CAL_0b1upfYfBdH8E8UVnn2fP2V3BG-shKa_kgzzsEN4180+2Pg@mail.gmail.com>
	<CANVt3iaeej7SSkeUDKJyg49XZy6t49Z0_vCmkGe_nY9VfSm_qw@mail.gmail.com>

On 07/14/2012 09:21 AM, B Sreejith wrote:
>
> Dear Sergev,
>
> We have around 15 to 18 separate products.What we are told to do is to 
> check the scalability of the underlying DB of each product (application).
> That's the requirement.Nothing more was explained to us.That's why I 
> said earlier that I am confused on how to approach this.
>

Sounds like your client / boss has a case of buzz-word-itis. 
"Scalability" means lots of different things:

- How well it copes with growth of data sizes
- How well it copes with growth of query rates / activity
- How well it copes with larger user counts (may not be the same as prior)
- Whether it's easily sharded onto multiple systems
- Whether it has any locking choke-points that serialize common operations
- ....

Perhaps most importantly, your database is only as scalable as your 
application's use of it. Two apps can use exactly the same database 
structure, but one of them can struggle massively under load another one 
barely notices. For example, if one app does this (pseudocode):

SELECT id FROM customer WHERE ....
FOR attribute IN customer
    SELECT :attribute.name FROM customer WHERE id = :customer.id
    IF attribute.is_changed THEN
        UPDATE customer SET :attribute.name = :attribute.new_value WHERE 
id = :customer.id
    END IF

and another just does:

UPDATE customer
SET attribute1 = value1, attribute2 = value2, attribute3 = value3
WHERE ....


The first will totally melt down under load that isn't significantly 
different from idle as far as the second one is concerned.

That's a ridiculously bad example for the first app, but real examples 
that aren't much better arise from badly tuned or badly written object 
relational management systems. The classic "N+1 selects" problem and 
massive inefficient multiple left outer joins are classics.

Thus, you can't really evaluate the scalability of the database under 
load separately from the application that's using it and the workload.

--
Craig Ringer

view thread (12+ messages)  latest in thread

Message-ID: <5000FE32.2000909@ringerc.id.au>
Permalink:  ../5000FE32.2000909@ringerc.id.au/
Also on:    postgresql.org/message-id/5000FE32.2000909@ringerc.id.au

 · 

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: ringerc@ringerc.id.au, bsreejithin@gmail.com, gray.ru@gmail.com, sreejith.balakrishnan@tcs.com
  Subject: Re: Any tool/script available which can be used to measure scalability of an application's database.
  In-Reply-To: <5000FE32.2000909@ringerc.id.au>

* 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