Re: Any tool/script available which can be used to measure scalability of an application's database.

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: B Sreejith <bsreejithin(at)gmail(dot)com>
Cc: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org, "sreejith(dot) balakrishnan" <sreejith(dot)balakrishnan(at)tcs(dot)com>
Subject: Re: Any tool/script available which can be used to measure scalability of an application's database.
Date: 2012-07-14 05:05:54
Message-ID: 5000FE32.2000909@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Craig Ringer 2012-07-14 08:48:57 Re: Any tool/script available which can be used to measure scalability of an application's database.
Previous Message Craig Ringer 2012-07-14 03:35:27 Re: PostgreSQL db, 30 tables with number of rows < 100 (not huge) - the fastest way to clean each non-empty table and reset unique identifier column of empty ones.