7

I'm using JMeter for load testing. I'm going through and exercise of finding the max number of concurrent threads (users) that our webserver can handle by simply increasing the # of threads in my distributed JMeter test case, and firing off the test.

Then -- it struck me, that while the MAX number may be useful, the REAL number of users that my website actually handles on average is the number I need to make the test fruitful.

Here are a few pieces of information about our setup:

  • This is a mixed .NET/Classic ASP site. Upon login, a browser session (with timeout) is created in both for the users.
  • Each session times out after 60 minutes.

Is there a way using this information, IIS logs, performance counters, and/or some calculation that will help me determine the average # of concurrent users we handle on our production site?

3
  • 1
    Google analytics might help you Feb 7, 2012 at 17:46
  • how many users you have per day, and much time a page takes to be send (2 seconds ? and 200 users per day )?
    – Aristos
    Feb 7, 2012 at 18:07
  • You could use a load tester that uses a macro to perform 'real' user actions including semi-random timed pauses between clicks. Several services exist to do this.
    – Jon Adams
    Feb 7, 2012 at 21:59

3 Answers 3

4

You might use logparser with the QUANTIZE function to determine the peak number of requests over a suitable interval.

For a 10 second window, it would be something like:

logparser "select quantize(to_localtime(to_timestamp(date,time)), 10) as Qnt,
    count(*) as Hits from yourLogFile.log group by Qnt order by Hits desc"

The reported counts won't be exactly the same as threads or users, but they should help get you pointed in the right direction.

The best way to do exact counts is probably with performance counters, but I'm not sure any of the standard ones works like you would want -- you'd probably need to create a custom counter.

3

I can see a couple options here.

  1. Use Performance Monitor to get the current numbers or have it log all day and get an average. ASP.NET has a Requests Current counter. According to this page Classic ASP also has a Requests current, but I've never used it myself.

  2. Run the IIS logs through Log Parser to get the total number of requests and how long each took. I'm thinking that if you know how many requests come in each hour and how long each took, you can get an average of how many were running concurrently.

Also, keep in mind that concurrent users isn't quite the same as concurrent threads on the server. For one, multiple threads will be active per user while content like images is being downloaded. And after that the user will be on the page for a few minutes while the server is idle.

2

My suggestion is that you define the stop conditions first, such as

  • Maximum CPU utilization
  • Maximum memory usage
  • Maximum response time for requests
  • Other key parameters you like

It is really subjective to choose the parameters and I personally cannot provide much experience on that.

Secondly you can see whether performance counters or IIS logs can map to the parameters. Then you set up proper mappings.

Thirdly you can start testing by simulating N users (threads) and see whether the stop conditions hit. If not hit, you can go to a higher number. If hit, you can use a smaller number. Recursively you will find a rough number.

However, that never means your web site in real world can take so many users. No simulation so far can cover all the edge cases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.