{"id":720,"date":"2010-03-01T10:35:38","date_gmt":"2010-03-01T14:35:38","guid":{"rendered":"http:\/\/www.webperformanceinc.com\/load_testing\/blog\/?p=720"},"modified":"2010-04-19T17:03:00","modified_gmt":"2010-04-19T21:03:00","slug":"how-user-ramping-works-part-one","status":"publish","type":"post","link":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/03\/how-user-ramping-works-part-one\/","title":{"rendered":"How User Ramping Works &#8211; Part One"},"content":{"rendered":"<p>How we add new virtual users to a test can be confusing when you&#8217;re first starting out with Load Tester, and sometimes can result in tests that do not ramp up to the number of users you expect or otherwise behave strangely.<\/p>\n<p>To start, why do we even ramp up load?\u00a0 Why not start with a set number of users?\u00a0 We&#8217;ve covered that question in a <a title=\"Stepped Ramp\" href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2008\/07\/load-test-configuration-using-a-stepped-ramp\/\" target=\"_blank\">previous blog post<\/a>.<\/p>\n<p>Another reason for using a stepped ramp is that it&#8217;s inefficient to restrict a test to a single level of virtual users.\u00a0 Most websites perform pretty basic functions, and these functions do not change much over time.\u00a0 You could perform multiple tests at each desired user level, but that takes as much time as it takes the users to run through the test cases for each test, which can be quite substantial.\u00a0 It&#8217;s far more efficient to ramp up user load <em>during<\/em> a single test, so that you can test all the desired user levels with the test cases running in parallel.\u00a0 This saves time, and allows you to ramp right up to the failure point in one test rather than guessing and running multiple tests.\u00a0 This also gives you a much better mix of users doing different test case steps at the same time, helping to prevent load surges.<\/p>\n<p>Ok, so how do we actually configure the user ramp?\u00a0 This is the Load Configuration screen:<\/p>\n<div id=\"attachment_721\" style=\"width: 490px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-721\" class=\"size-full wp-image-721\" title=\"100_user_load_config\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/02\/100_user_load_config.png\" alt=\"A basic load configuration\" width=\"480\" height=\"272\" srcset=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/02\/100_user_load_config.png 600w, https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/02\/100_user_load_config-300x170.png 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><p id=\"caption-attachment-721\" class=\"wp-caption-text\">A basic load configuration<\/p><\/div>\n<p>The first and most obvious setting is is the &#8220;Run for&#8221; setting &#8211; how long you want the test to run.\u00a0 From a user ramp perspective, this is the available time you have to ramp your user count.\u00a0 (Ignore the &#8220;Run maximum repeats&#8221; option for now.)\u00a0 You can set this to whatever you want subject to your own time constraints, the memory available to record results, and enough data to supply the needs of the test cases that would take place over that time period.<\/p>\n<p>Next, we have the number of starting users.\u00a0 We allow this to be set independently to allow for cases where many users need to be started at once, and also cases where you want to start with a large number of users and then add a trickle of users as the test progresses.\u00a0 Normally, this will be set at the same value as the &#8220;Increase by&#8221; setting, unless you have a reason to change it.\u00a0 It&#8217;s also a good idea to set this number to a multiple of the number of load engines you are using.\u00a0 For example, if you are working with five load engines, you should start with 10, 20, or 50 users rather than 17 or 32 users.\u00a0 This helps keep the load engines from becoming unbalanced.<\/p>\n<p>The most important part of the user ramp is handled by the &#8220;increase by&#8221;, &#8220;over&#8221;, and &#8220;every&#8221; settings.\u00a0 These settings control how many users are added per cycle, and how long we take to add them per cycle.\u00a0 For example, if I ramp by 50 users over one minute every two minutes, that means I add 50 users randomly over the course of the first minute, and then I wait one minute until the two minute cycle time is up.\u00a0 Then I add the next ramp of 50 users over the next minute.\u00a0 Like this:<\/p>\n<p>1st minute: add 50 users randomly<\/p>\n<p>2nd minute: no users are added<\/p>\n<p>3rd minute: add 50 users randomly<\/p>\n<p>4th minute: no users are added<\/p>\n<p>&#8230; and so on.\u00a0 In other words, the ramp period where we are adding users (the &#8220;over&#8221; setting) is <em>included<\/em> in the cycle time (the &#8220;every&#8221; setting).\u00a0 Note that we can ramp continuously by setting the ramp period and the cycle time to the same value.\u00a0 However, a stepped ramp as described here is much more useful, as it allows you to view the performance of the system at that user level without the strain of new users coming on-line.<\/p>\n<p>It&#8217;s also useful to note at this point that these settings also apply to the starting users.\u00a0 For example, if I configure the starting users at 100 and the ramp at 50 users over one minute every two minutes, my first few minutes will actually look like this:<\/p>\n<p>1st minute: add 100 users randomly<\/p>\n<p>2nd minute: no users added<\/p>\n<p>3rd minute: add 50 users randomly<\/p>\n<p>4th minute: no users added<\/p>\n<p>&#8230; and so on.<\/p>\n<p>Last, we have the ability to limit the total number of users added during the test.\u00a0 This allows you to ramp quickly to a predetermined number of users, and then run at that level for a period of time without adding new users.\u00a0 This is useful for very long running tests where we are examining the performance of the system over time, rather than continuously ramping load.\u00a0 Below that setting is the &#8220;maximum users&#8221; box.\u00a0 This isn&#8217;t a configuration option, but rather a quick calculator to show you how many users your current ramp will add given the current test duration.<\/p>\n<p>In part two, I&#8217;ll talk about how users are distributed across the load engines, as well as the cases where Load Tester can behave differently than you might expect given the settings you&#8217;ve configured.<\/p>\n<p><a title=\"How User Ramping Works - Part Two\" href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/04\/how-user-ramping-works-part-two\/\" target=\"_blank\">How User Ramping Works &#8211; Part Two<\/a>.<\/p>\n<p>Matt Drew<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How we add new virtual users to a test can be confusing when you&#8217;re first starting out with Load Tester, and sometimes can result in tests that do not ramp up to the number of users you expect or otherwise behave strangely.<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[49,237,60,30,33,18],"class_list":["post-720","post","type-post","status-publish","format-standard","hentry","category-load-testing","tag-load-tester","tag-load-testing","tag-stress-testing","tag-tutorial","tag-virtual-user","tag-web-performance"],"_links":{"self":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/720","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\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/comments?post=720"}],"version-history":[{"count":8,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/720\/revisions"}],"predecessor-version":[{"id":746,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/720\/revisions\/746"}],"wp:attachment":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/media?parent=720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/categories?post=720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/tags?post=720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}