Simulate heavy usage

Go To StackoverFlow.com

4

I'm making a online game (with hopefully thousands of players each hour) which uses quite a few queries to the mysql database. Before release, It would be nice if I could simulate heavy usage to see the performance. Is there anyway to do this?

Thanks in advance

2012-04-04 19:58
by BlackMouse
There are some paid services that do this - http://blitz.io and also other posts that discuss this: http://serverfault.com/questions/31933/mysql-load-stress-testin - chrisjlee 2012-04-04 20:05
Does this qualify as a unit test - Eve 2012-04-04 20:21


7

Look at mysqlslap. It is a load emulator that lets you see how well a particular query set or table engine performs under high-load conditions.

More information here: http://dev.mysql.com/doc/refman/5.1/en/mysqlslap.html

Edit: I just noticed this tool is only available for MySQL > 5.1.4. I don't know what version you are currently using.

2012-04-04 20:05
by Pierre-Olivier


0

If you can find out the server's processor and memory usage for a single query, you can test your application, get those result and multiply them by the number of users you want to see if the server can afford to attend. You also can start your application multiple times but I don't think your computer can handle 100 application instances. If you only want to check how many SQL queries can be processed you can also created a server-script with PHP, ASP or whatever language which could calculate the response time. You run that script in 100 windows at the same time and see what happen.

2012-04-04 20:04
by ali
Not a bad first cut - but there are lots and lots of performance issues which crop up in the contention for resources, say, which are immune to "calculator-based" testing. I think the second suggestion, spawning lots of instances of a test script, is worth investigating by the OP - Will Chesterfield 2012-04-05 00:05
Ads