This post has been updated. It’s now much easier to calculate concurrent users using your Google Analytics data. Follow this 3 steps guide.
———
To determine how much traffic (how many visitors) your site can handle, you usually run a load test that simulates a certain number of users accessing your site at the same time, then reports how fast your site serves web pages to those simulated users. Many people encounter a problem when they want to do this; Most, if not all, load testing systems want you to specify how many concurrent simulated users should be used in the load test, but most people only know how many visitors their website has per day or per month. The question that comes up is then “how to convert visits per month to concurrent users?”
If we start with the source of information about site visits, Google Analytics is very popular as a means of keeping track of website traffic. It shows you lots of interesting information about your visitors and what they do on your site, and is used by a lot of site administrators today. Because of this, I will use Google Analytics in my examples below.
One thing you can see on the Google Analytics dashboard is the number of visits your site has had the last month (“Visits”). This is of course interesting as it gives you an idea of how much traffic your webserver has to handle in a month. However, it doesn’t tell you the peak traffic load your server has to handle at some specific point during the month. Most people will want to make sure their server can handle the peak traffic load (and more) so as not to risk losing business because of slow page load times.

Peak traffic can vary a lot between days, depending on many different circumstances. To view the number of visits per day in Google Analytics, you just click the “Visits” link on the dashboard (circled on the image above). For our own site –loadimpact.com – we see that high-traffic days (for us typically tuesday-thursday) see 100-200% more traffic than low-traffic days (typically saturday and sunday). Your mileage may vary, of course. It all depends on the type of site and the type of users. Below we have selected a 7-day period and clicked on the “Visits” link for our example site.

We can see in this example that on monday, january 26, the site had a traffic peak with 622 visits.
If you find a single day where you have a lot of traffic, you can then proceed to find out something that is even more interesting – namely what the peak traffic is for any single hour that day. This is a bit more complex in Google Analytics, however – you have to create a custom report. The custom report interface is available through a link in the left hand menu:

When you’re in the custom report interface you have to create a new custom report, then select what things you want your report to contain. You can specify different Metrics and Dimensions to use in the report. We will specify a single Metric and a single Dimenion in our report. The Metrics and Dimensions are grouped in different categories. The categories we will use are “Site Usage” and “Visitors”. You can see them circled on the image below.

First, we click on the Metric category “Site Usage”, which brings up a range of metrics we can use. Scroll down until you find the “Visits” metric, then drag it over to the empty metric box to the right.

Then close the “Site Usage” metric category and instead open the “Visitors” dimension category. Under that category you’ll find a dimension called “Hour of the day”. Drag this dimension over to the empty dimension box to the right.

Now you have a report that can show you the number of visits distributed over the different hours of the day, for the time period you have selected. Save the report and try viewing it.
Generating this report for the day you found that had the highest number of visitors, will likely show what the peak number of visits per hour your site has. Maybe you will see that at 3pm on that day, you had 1,000 visits. This value, plus a little margin, is very possibly the target traffic level you want your site to be able to support (while still responding reasonably fast, so users don’t have to wait for pages to load).
On the screenshot above we can see that on the day selected, we got the most visits at 1600 hours (4:00 pm to 4:59 pm). This is the traffic for the peak hour of the peak day, so it is a fairly good approximation of the maximum traffic our site has seen.
When you have determined what number of visits per hour you want your site to be able to handle, you should of course test if your site can handle that level of traffic (with reasonably fast page load times). To do this, you have to run a load test. The problem then is that most, if not all, load testing systems will want you to specify how many concurrent (“simultaneous”) users you want to subject your site to. They don’t talk about users or visits per month, per day, or even per hour. So how do we translate those figures to concurrent users?
Converting visits per hour to concurrent users:
concurrent_users = (hourly_visits * time_on_site) / 3600
So, if you have 1,000 visits per hour, and each visitor stays on the average 3 minutes (180 seconds) on your site, that means you would have (1000 * 180) / 3600 = 50 concurrent users.
Note that you need to use “visits”, and not “unique visitors”, when calculating the number of concurrent users. A single physical person may visit a site twice during an hour, which will of course cause twice the load on the web server. So we want to count the number of times the site has been visited, and not the number of unique persons that visit the site.
Time on site
The time on site parameter is the average time a user spends on the site. This is also something Google Analytics will tell you. It is the “Avg. Time on Site” value shown on the dashboard.
To translate visits per month to concurrent users:
concurrent_users = (monthly_visits * time_on_site) / (3600 * 24 * 30)
So, you just divide by the number of seconds in a month, rather than as before the number of seconds in an hour.
Now, when you know how many concurrent users you want your site to be able to handle, you can set up your load test. If, for example, you calculate that your site experiences a maximum of 50 concurrent users, but you want to test that the site can handle occasional peaks of, say 50% more traffic, then you want to verify that your site can handle up to 75 concurrent users. A reasonable load test setup might then be a ramp-up load test that tests four different load levels, starting at 25 concurrent simulated users, ramping up to 50, 75 and finally 100 concurrent users. That test would show you what response times (page load times) users would experience in low (25 users) and high (50 users) traffic conditions. The load levels 75 and 100 simulated users would also show what happens when the site/service grows or you see an exceptional burst of traffic due to some external event (maybe a big news blog writing an article about your site, generating a lot of extra traffic).
Thanks to Ditlev at VPS.NET who gave us the idea for this article. He actually wrote one of his own also, that you should look at if nothing of this made any sense. It is available here
Useful article, one thing to consider (which may not be the case for many sites but is for ours) is how those visits are distributed across the hour. We have a spike at 8-9am (for example) but that is mostly loaded in the first 30 minutes. You can tell and get a ‘feel’ for it by keeping an eye on the real time figures for a few days. In this case using just the above wouldn’t give me the load I need to push through the site – it’s a darn good place to start though. Thanks.
This is really helpful. Thanks!