amuck-landowner

Best way to benchmark test environments for real-world load?

MannDude

Just a dude
vpsBoard Founder
Moderator
So, I've got a dev VPS that I am planning to use to test several different environments and want to put them under real-world load to measure the results. Trouble is, I'm not quite for sure how to proceed as I want to ensure I get accurate results that I can easily compare when running the same tests on other setups. This will serve as a learning project for me, as I'm only familiar (currently) with relatively stock LAMP and LNMP stacks, so will allow me to learn something new about different setups as well as help me determine which would be most suitable for my own needs.

For the tests, I'll be using a Linode 2GB box. After each test and the results are measured and recorded, I'll wipe the VPS and start fresh with installing a new setup.

Currently installed on it is a simple LAMP stack with Varnish cache and a Wordpress install, but with no actual content it seems silly to run tests on it as the results would be nowhere near accurate for real-world testing.

Questions:

  • What's the best way to generate dummy content to grow the DB size and to create pages?
  • What's the best way to uniformly request these pages/content and measure the results?
I'm currently not concerned with tweeking setups for low resource usage. My main interest is performance. 

Thanks!
 

drmike

100% Tier-1 Gogent
Well, the best thing to bench against is actual data, which you have.  Port it over to dev.

Folks swear by ApacheBench, but it's ancient and sheer repetitive throughput that tests mainly cached elements normally (after first request).

You need something with dynamic URL testing and way to create dynamic URLs on the fly.  Something ideally scripted to do such.

Problem is, that likely doesn't really simulate real world use on the site.

So if anything, would probably do well to pull a list of URLs on the site over a duration and compact the time duration and run them via script.  So if 100 URLs in 10 minutes, might do that in 5 minutes, then 2.5, etc.

Your load and resource contention undoubtedly will be in MySQL likely first and should be tuned big time.  Secondarily, PHP will be the victim (could be first all depending).  PHP optimizations need made to utilize more RAM than you previously have.  Ditto with MySQL.
 

drmike

100% Tier-1 Gogent
What you probably are after is response times and minimizing such.  As opposed to how many static documents will this config crap out in 30 seconds.

Testing is another black art and optimization is the cousin black art.

A resource you could spend the next month looking and learning from:

http://highscalability.com/
 
Top
amuck-landowner