Re: Concurrency testing

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Concurrency testing
Date: 2009-10-08 08:28:53
Message-ID: 87d44yi916.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Smith <gsmith(at)gregsmith(dot)com> writes: > The stuff I've been
building lately takes "how many sessions at once?" as an > input,
and the useful range on that (particularly as we wander further >
toward multi-core land) is much higher than you'd want to manage
one at a > time manually. I'd rather see a "session simulator"
program that picks > among several types of behaviors and executes
them, and then you can throw > as many of those as you want into
the mix. You can do something like that > with pgbench right now
if you pass it multiple files, the tricky part is > figuring out
what regression output you should expect. That tool exists and
do support PostgreSQL. It's called Tsung and is Open Source:

http://tsung.erlang-projects.org/
http://tsung.erlang-projects.org/user_manual.html
http://archives.postgresql.org/pgsql-admin/2008-12/msg00032.php

It can handle thousands of connections per node and as many nodes
as you
like, and already includes OS monitoring (adding to its own
session /
transaction monitoring, of course). It also support SNMP here. Oh,
and
thinktime too `randomize using a probability distribution
(currently exponential)'.

I even started a DBT2 implementation as tsung modules, back when
returning from pgcon 2006:

http://tapoueh.org/misc.html#sec7
darcs get http://pgsql.tapoueh.org/dbt2-tsung/

The thing that tsung isn't made for is tracking the results
themselves
to validate against regressions. This would have to be done by
other
means, maybe server side.

So Tsung ain't a direct answer to OP [waves to david], or only if
we
want to add it the checking capability. I'll talk about it with
tsung
main author. But it answers a lot of the content of this thread,
so I figured I'd better talk about it before it's being poorly
rewritten in perl.

Regards,
--
dim

PS: erlang is damn easy to learn.

PPS: sorry guys, perl is not made for concurrent programming, it's not
going to be easy reaching current tsung level (years of work with ad-hoc
tools) using a general hobbyist programming language.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2009-10-08 08:34:51 Re: Concurrency testing
Previous Message Pavel Stehule 2009-10-08 08:02:15 PROPOSAL: Typmods for functions