How to use the generateVisits.php and stress.sh scripts?


(AndrewDB) #1

Hello,
First my thanks to all the Piwik developers and my best wishes for 2010 ! style_emoticons/<#EMO_DIR#>/smile.gif

Now on to my question :
How do I use the generateVisits.php script to generate visits ? What parameters does the script take, and what does it do exactly ?

Also about the stress.sh script, also found in the piwik/misc directory, how do I use it ? Does it depend on having an SVN copy of a development version of Piwik to work ?
I would like to stress-test a heavy-duty Piwik configuration that I have put together for this purpose, this is why I am asking these questions.

Estimated traffic is around 1 million individual visitors / day !


(DriverDan) #2

generateVisits.php can be run by a superuser. It will insert visits into the first site setup in Piwik. Open it in a browser from a working installation to run it. View the file’s source for more info.

stress.sh just runs Apache’s benchmarking tool (ab). You’d have to edit it to set the correct URL. Go to ab - Apache HTTP server benchmarking tool - Apache HTTP Server for ab’s docs.


(Matthieu Aubry) #3

Currently there is no easy way to load test a Piwik instace against hundreds of thousands of visits. We have ideas on how to make this an easy and reusable process: http://dev.piwik.org/trac/ticket/134.
In any case, 1M visits sounds a bit too much for Piwik at the moment, considering the following issue: http://dev.piwik.org/trac/ticket/766

We are very much interested in your feedback and if you find anything that would help scale Piwik to this traffic, let us know. Making Piwik more efficient is an important part of our Piwik 1.0 roadmap: http://dev.piwik.org/trac/wiki/Piwik-Vision-Roadmap


(AndrewDB) #4

Thank you both for your answers, and particularly for the very useful links to the two tickets.

Regarding the memory allocation issues, I’ll be testing the generateVisits.php script on a machine with 8GB of RAM, and check how many visits I can generate with around 4GB allocated to PHP.

The ab tool also looks interesting to stress test my Piwik configuration, so I’ll be trying that too.

Onto reading the docs now… style_emoticons/<#EMO_DIR#>/blink.gif