Hello to everyone.<br><br><some background><br><br>I am a total Erlang newbie (I-have-written-a-little-bit-of-demo-code level) but I am falling in love with the language.<br>I have also just started a new job, as Postgresql DBA and Tsung may just be my big Erlang break:<br>
My company has serious load testing needs, Tsung is exactly what they couldn't find before, it's got a postgres module,<br>and a big part of my job will be scalability tests, so Tsung might just be my ticket to programming Erlang professionally<br>
(they will probably be very happy if I come up with some Erlang code for test case randomization or other cool things) <br>And, by the way, I really enjoyed the Erlang Exchange. Thanks, guys.<br><br></some background><br>
<br>I have been trying to load test one of our development Postgres servers, using a very simple setup (no distribution/<br>coordination of multiple machines). Now, the results I get if I run my test scenario on the actual db server present<br>
some qualitative differences compared to the results I get if the tests originate on another machine connecting through<br>port 5432 (-- I am using the same tsung.xml file in both cases, of course)<br><br>The total size_sent (kbits) lines in both cases match the relevant patterns in the users arrival graph. The size_rcv lines<br>
are not consistent, though. In the local test, the size_rcv line linearly grows up to 100 users (simultaneous) then becomes<br>horizontal - which may have something to do with the default postgres setting for 100 max_connections. Does this mean<br>
the same original 100 connections are maintained throughout the test, even after the queries have finished, so there is no<br>more data coming in?<br><br>The size_rcv line for the remote test, however, always stays very near zero. Now, the total errors graph matches exactly the<br>
total user arrival graph, so I am kind of assuming something is going horribly wrong with the remote queries (users<br>send by don't receive).<br><br>Now, I have tried to run the following line in both machines (local and remote, where local is the server) and it works<br>
fine in both cases. The only difference is I am using the trust model for local pg connections (so I don't get asked for<br>a password when I run this on the server) and the md5 model for remote pg connections (so I get asked for a password<br>
when I run this on the remote machine) - I am assuming this is an authentication problem, then.<br><br>cat test.sql | psql -U user -h localhost -p 5432 database<br><br>I have also tried to change the model for remote pg connections to password (clear text over the net, bad idea), but I<br>
get exactly the same behaviour. Is there something broken with tsung's authentication mechanism, or is there something<br>wrong in my xml file:<br><br> <transaction name="connection"><br> <request><br>
<pgsql type="connect" database="database" username="user" /><br> </request><br> </transaction><br><br> <request><pgsql type="authenticate" password="pass"/></request><br>
<br>Another thing concerns arrival phases:<br><br>I have specified three arrival phases in the xml file, a fast one followed by a slow one, followed by a fast one (this<br>doesn't need to make sense, I am just experimenting with the software). Tests from the local machine show an<br>
expected ladder-like pattern when it comes to the graphes-Users_Arrival-total graph, tests from the remote machine<br>don't (it's quite linear). Similar patterns may be observed in the total kbits size_sent graphs and the total errors graphs,<br>
so I think for some reason user arrival doesn't go as planned in the remote test box case. Any ideas?<br><br>There is also the matter of finished users in the local test. For some reason, those 100 users which are able to<br>
connect don't seem to finish. In fact, there is a constant difference of about 100 users between users_count and<br>finish_users_count throughout the graph, start to finish.<br>The number of simultaneous connections which remain after the end of the experiment confirms this.<br>
Should this happen, considering I have included the following line in tsung.xml?<br><br> <request><pgsql type="close"></pgsql></request><br><br>Finally, in the transaction graphs I also get something called page (which, by the way, is huge - its mean value<br>
reaches 60000 msec at some stages).<br><br>Any help will be appreciated...<br>
<br>Michael<br><br>