views:

633

answers:

8

I've been tasked with stress/load testing our company web site out of the blue and know nothing about doing so. Every search I make on google for "how to load test a web site" just comes back with various companies and software to physically do the load testing.

For now I'm more interested in how to actually go about setting up a load test like what I should take into account prior to load testing, what pages within my site I should be testing load against and what things I'm going to want to monitor when doing the test. Our web site is on a multi-tier system complete with a separate database server (IIS 7 Web Server, SQL Server 2000 db). I imagine I'd want to monitor both the web server and the database server for testing load however when setting up scenarios to load test the web server I'd have to use pages that query the database to see any load on the database server at the same time.

Are web servers and database servers generally tested simultaneously or are they done as separate tests?

As you can see I'm pretty clueless as to the whole operation so any incite as to how to go about this would be very helpful.

FYI I have been tinkering with Pylot and was able to create and run a scenario against our site but I'm not sure what I should be looking for in the results or if the scenario I created is even a scenario worth measuring for our site.

Thanks in advance.

+3  A: 

Check out JMeter. I found it a little tricky to get started with but once you have your tests setup it's easy to run. They have a tutorial on how to setup distributed testing here.

TLiebe
+2  A: 

Here's a listing of tools that will help get you started with this. You're right to want to read up on it first, stress testing can get complicated.

http://www.softwareqatest.com/qatweb1.html

Robert Greiner
+1  A: 

First, get a web-stressing tool like Neoload.

Model a number of user activities and bias your test to correspond to predicted user patterns, then scale load up as you see fit. Running queries against the database and measuring response time tells you nothing about user experience. Rather, by modeling user activities, you can gauge exactly how your server/system will respond under real load, as that's what you'll be generating.

User activity modeling can get pretty complex, but good stress tools like Neoload let you closely model the exact behavior of any machine hitting your server. Ideally, you would craft network traffic just as you would normally, so make sure to hit your load balancer if you've got one.

Stefan Kendall
+1  A: 

See http://stackoverflow.com/questions/340564/best-way-to-stress-test-a-website that explains how to achieve it using a Firefox plugin called Selenium.

Gregory Pakosz
I'd like to add that if you go down the Selenium route, check out http://browsermob.com as a way to get hundreds of Selenium instances to all coordinate at once and slam your site. Note: I'm the founder of BrowserMob and OpenQA and one of the creators of Selenium RC.
Patrick Lightbody
+1  A: 

Generally speaking load tests will run through common scenarios with various user loads.

So for example, you might set up a test wherein 50 users login every second for 10 minutes and another where the number starts at 5 users/second and scales up to 1000 / second or whatever numbers make sense for your your site.

edit:
The idea is to test how your actual application behaves when in use across all tiers.
If you are going to be load testing, definitely invest (time and or $) in a good tool.

BioBuckyBall
+1  A: 

I found Visual Studio Test edition easier to test with (though it is not free). You can record a browsing session as a single test and it will allow you to read the perfmon stats from both your webserver and database easily enough.

The first step you should take is to look at your IIS logs to find out what is going on there. Log Parser 2 is the tool I would use should get the IIS logs into a database.

Querying that will give you an idea of peak load.

Next step is to formulate a goal or two for the testing. Do you need to make sure the website is able to handle spike loads on a single page or two of X requests per second?

Are you intending on increasing the customers of the site, in which case take the current IIS log load and forumlate webtests that can simulate that range of page requests, but load for the expected concurrent users.

If you are intending to change functionality on the site, you can do a baseline loadtest and compare the performance after any changes to the site.

The real goal in load testing is to prove that the application and hardware are able to handle a target load that the business finds acceptable and still returns pages within a reasonable time.

Nat
We are a MS partner so we may have access to that tool already. Thanks. To answer a few of your questions, I've not been given any specific goals to test for so I guess I'm just benchmarking the system under its current configuration.
Ryan
Sweet, break down the IIS logs activity into a group of web tests create a load test to get the proportion of the tests about right. Go to 2010 it is really nice and works well even in Beta.
Nat
+2  A: 

A tool will help (Pylot, which is hosted at OpenQA, is a good open source one), but it also sounds like you need some general purpose advice. At BrowserMob, we provide hands-on support and guidance for users of our software (paid or free/trial). Feel free to sign up, check it out, and ping us if you have any questions.

Patrick Lightbody
+1  A: 

As you can see by the answers to this question, there are lots of programs available for load testing. In my experience I have found Siege to be my personal favorite. Its simple, provides most of the options needed to do load testing. Here is an example usage:

seige -c 10 -t 1M http://www.google.com

This will send 10 concurrent requests to google.com for 1 minute. If you want to test more than one page you can also provide a file which contains a list of urls.

Note that a tool like seige is appropriate when you have a single or set of urls that you would like to test. If you want to test more complicated flows (e.g. user logs in, submits entry, logs out) then you will want to use something like selenium.

jkupferman