{"id":1872,"date":"2011-02-03T09:25:54","date_gmt":"2011-02-03T13:25:54","guid":{"rendered":"http:\/\/www.webperformance.com\/load_testing\/blog\/?p=1872"},"modified":"2018-08-06T11:14:47","modified_gmt":"2018-08-06T15:14:47","slug":"load-testing-basics-how-many-concurrent-users-is-enough","status":"publish","type":"post","link":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/02\/load-testing-basics-how-many-concurrent-users-is-enough\/","title":{"rendered":"Load Testing Basics: How Many Concurrent Users is Enough?"},"content":{"rendered":"\n<div class=\"landing-page-7mh\">\n<link href=\"\/css\/how-many-users.css\" rel=\"stylesheet\"\/>\n<div class=\"page-title grid\">\n<h2 class=\"unit\">How Many Users Can Your Website Handle?<\/h2>\n<div class=\"product-actions var--footer\">\n      <span>Start running <strong>real load tests<\/strong> right now.<\/span><br \/>\n&nbsp;<br \/>\n      <a href=\"\/download\/\">Free 50VU Download<\/a>\n    <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<p>The most common question regarding a website&#8217;s performance is not how fast the website is or how it scales, but something more fundamental:<\/p>\n<p>What should the performance goal be in terms of concurrent users?<\/p>\n<p>Should it be one hundred concurrent users? A thousand? Ten thousand? Does it require one server or a hundred to handle the load?<\/p>\n<p>There&#8217;s a good reason for how many times this question comes up: it\u2019s tricky and there\u2019s no definitive answer. If it is a new website it\u2019s anyone\u2019s guess what the demand will be. Even if it is an existing website, web analytics software typically give marketing reports on how many customers were acquired per month or per week, and even a per-day measurement but doesn\u2019t give the numbers required. The reason is the difference between average and instantaneous peak. It doesn&#8217;t matter if only 5% of a site&#8217;s capacity is used all year if the site was unusable for a critical period. The only thing that matters in terms of protecting your site against crashes and slowdowns is instantaneous peak.<\/p>\n<p>So while marketing speaks in terms of transactions a day or even unique customers on the site, the only measurement useful for capacity planning is how many people were on the website at the same time, the instantaneous peak. By &#8220;on the website&#8221;, I mean looking at their browsers at a page on the website, regardless of whether that customer is reading or clicking. It\u2019s tempting to use hits\/sec or transactions\/sec, which are fine metrics, but what happens when you redesign the site for higher performance and the number of hits\/sec or transactions\/sec drops as a result? The capacity of the site may have gone up, but the number of hits\/sec would drop. In the end you need a metric that is implementation independent.<\/p>\n<p>The question of figuring out the maximum number of concurrent users is made even more difficult because a surprising number of people tasked with speccing a website don&#8217;t understand the business, and that is critical to increasing the accuracy of the estimate. In the end, it is still a guessing game, not only because of the unknowns, but because it involves the future. Even if you have an existing website with accurate web logs, it\u2019s impossible to tell the future and guarantee that there won\u2019t be a huge traffic spike someday.<\/p>\n<p>So, it is impossible to be really accurate and we&#8217;re reduced to being close enough. What are the penalties for getting it wrong? Guess too low, and a site may experience a slowdown or crash during a critical period. Will that merely annoy your customers, or will the company lose money? If it\u2019s the later, then it pays to reduce the chances of a crash happening. But what happens if you over spec a site and there&#8217;s too much excess capacity? The downside is added cost and complexity, but that&#8217;s the price that needs to be paid for reducing the risk; in this way, building in excess load capacity is like insurance.<\/p>\n<p>Let&#8217;s take a look at what the typical systems engineer has in terms of information. If the site exists at least there&#8217;s some data, although it almost never has the information that&#8217;s actually needed. The information that comes from the site tends to be marketing statistics. That&#8217;s nice, but how in the world can you possibly figure out the simultaneous peak user load from that?<\/p>\n<p>Obviously the more information you have about a business the more accurate the guesses, but let&#8217;s start with a common situation: the person setting up the website has no idea about the business and no way of getting any information. It sounds strange, but that happens more often that you would believe.<\/p>\n<p>For example, let\u2019s say marketing reports that the site either has or expects to have an average of 150,000 visitors per month. First calculation is easy: figure out the number of visitors per day. If the site is used equally 7 days a week, then divide by 30. If, however, the site is used mostly during the week you\u2019d divide by the number of non-weekend days in a month, around 21.7.<\/p>\n<p>For the sake of simplicity let\u2019s assume the site is used equally throughout the week for a per-day visitor number of 5,000. The next step is to figure out how many hours of the day the site is most active, which will differ from business to business. If you actually know the nature of the business and can identify the peak hours, then by all means, use those, but if you don\u2019t, then figure on using 12 hours as a rule of thumb.<\/p>\n<p>Average visits per hour = (5000 average visitors\/day) \/ 12 hours = 417<\/p>\n<p>To figure out the average concurrent users you need to know the average length a user stays on the site. This can be obtained either from the web metrics, or, if that isn\u2019t available, using a stopwatch and going through a couple of user scenarios yourself on the site, reading all of the material and filling out forms just like a typical user.<\/p>\n<p>Once you know the average visit length, you can then calculate average concurrent users. The key to understanding this calculation is the concept of levels of concurrency. If a user spends on average 10 minutes on a site, then one level of concurrency, i.e. one user simulator could simulate 6 visits in an hour, 60 minutes divided by ten minutes per visit.<\/p>\n<p>Average Concurrent Users = Visits per hour \/ (60 min\/hour \/ average visit)<\/p>\n<p>Using the 10 minute figure above, with an hourly visit rate of 417 gives an average concurrent user level of just 69, a far cry from the 150,000 per month figure we started with. The math isn\u2019t hard, but it\u2019s faster to type into the online form we use every day at Web Performance, Inc..<\/p>\n<p>Check out this great easy-to-use online calculator:<br \/>\n<a href=\"https:\/\/www.webperformance.com\/library\/tutorials\/CalculateNumberOfLoadtestUsers\/ \">https:\/\/www.webperformance.com\/library\/tutorials\/CalculateNumberOfLoadtestUsers\/ <\/a><\/p>\n<p>Now we know the average number of users on the site at one time, which is useful, but is still short of the number we need to know: the instantaneous peak number of concurrent users. Based on absolutely no science whatsoever, in the load testing business we use a multiplier range from 3 to 6 depending on the accuracy of the average concurrent user number.<\/p>\n<p><a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/02\/load-testing-basics-how-many-concurrent-users-is-enough\/peak-chart-607x376-2\/\" rel=\"attachment wp-att-1879\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1879\" title=\"peak-chart-607x376\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2011\/02\/peak-chart-607x3761.jpg\" alt=\"\" width=\"500\" height=\"310\" \/><\/a><\/p>\n<p>The more important it is to your business to not have a slowdown, the higher the multiple. In the above example that would put your \u201csafe\u201d number of concurrent users at 414, the target that would need to be verified by a load test.<\/p>\n<p>As an engineer it bothers me having to guess at these numbers, but then again, guessing is part of engineering. As more websites switch to the automatically scalable architectures enabled by cloud-computing this type of guesswork will be less important. Until then, run these calculations on your own website and let me know how close or how far they come to reality.<\/p>\n<p>Michael Czeiszperger<br \/>\nFounder, Web Performance, Inc.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How Many Users Can Your Website Handle?<\/p>\n<p>      Start running real load tests right now.<br \/>\n&nbsp;<br \/>\n      <a href=\"\/download\/\">Free 50VU Download<\/a><\/p>\n<p>The most common question regarding a website&#8217;s performance is not how fast the website is or how it scales, but something more fundamental:<br \/>\nWhat should the performance goal be in terms of concurrent users?<br \/>\nShould it be one hundred concurrent users? A thousand? Ten thousand? Does it require one server or a hundred to handle the load?<br \/>\nThere&#8217;s a good reason for how many times this question comes up: it\u2019s tricky and &hellip; <a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/02\/load-testing-basics-how-many-concurrent-users-is-enough\/\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1872","post","type-post","status-publish","format-standard","hentry","category-load-testing"],"_links":{"self":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/1872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/comments?post=1872"}],"version-history":[{"count":18,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/1872\/revisions"}],"predecessor-version":[{"id":4685,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/1872\/revisions\/4685"}],"wp:attachment":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/media?parent=1872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/categories?post=1872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/tags?post=1872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}