Tuesday, July 10, 2012

How do you determine the number of concurrent users you will need in your test?


It's quite a common question and sometimes a very difficult one to answer -
How do you estimate how many virtual users you should simulate in a performance test?
However if you have the following information you can make an estimate.

You need to know:

a: How many visits your site gets or how many visits you're expecting per day (choose a relevant day - e.g. if you're a business to business web site choose a weekday, if your a retail site perhaps a weekend day would be more appropriate)

b: The average time a user stays on the site

c: The ratio between a busy period and a slack period

d: How many minutes in a day (or at least how many minutes you consider the site to be active in a day)

You can then apply the following rule:
( a x b x c) / d = concurrent users

For example: you have a site which sees 30,000 visits each day, the average time a user spends on the site is 10 minutes and busy periods are 10 times busier than slack periods. This means that the concurrent user rate is (30,000 x 10 x 10) / 1440 = 2083 concurrent users.

I won't claim to have come up with this formula myself - it's from Performance Planning and Deployment with Content Management Server - a paper about MS's CMS system. The formula will apply to any web site, not just those hosted on these servers of course.

No comments:

Post a Comment