{"id":100268,"date":"2022-09-08T12:28:28","date_gmt":"2022-09-08T16:28:28","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=100268"},"modified":"2022-09-08T12:28:29","modified_gmt":"2022-09-08T16:28:29","slug":"load-test-k6","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/","title":{"rendered":"How To Load Test Your Site With k6"},"content":{"rendered":"<p> Servers are getting faster and faster, but there are still plenty of websites suffering from poor performance.  There are many variables that might cause a website to load slowly, and there are websites that have good load times, but only up to a certain number of concurrent users. <\/p>\n\n\n\n<p>\nHow can you find out how many users your website can handle?\n<\/p>\n\n\n\n<p> In this article, we\u2019ll take a look at a free tool that can help you send fake traffic to your site in order to measure the response. K6 is a free load tester utility that runs on JavaScript.  (You don\u2019t need to be a JavaScript expert to use it.  We\u2019ll provide a free sample script you can run in the examples below.) <\/p>\n\n\n\n<p class=\"alert alert-warning\"> Load testing on a live production site can cause traffic spikes.  Proceed with caution when performing load tests.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"#running-first-test-k6\">Running Your First Test With K6<\/a>\n<ul>\n<li><a href=\"#how-to-install-k6\">How To Install k6<\/a><\/li>\n<li><a href=\"#running-test-script\">Running The First Test Script<\/a><\/li>\n<\/ul>\n<\/li><li><a href=\"#case-study\">Case Study: Testing Two WordPress Sites<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"running-first-test-k6\">Running Your First Test With K6<\/h2>\n\n\n\n<p>With k6, you can orchestrate highly advanced and unique load scenarios.  (The more advanced settings for k6 are outside the scope of this article.) <\/p>\n\n\n\n<p>Below you will find a sample test you can run on your website, and some instructions with regard to how the test is structured.<\/p>\n\n\n\n<p>\nIn order to run the test you will need to install k6.\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"how-to-install-k6\">How To Install k6<\/h3>\n\n\n\n<p>\nThere are a few different ways to install k6, depending on your operating system.  For more detailed instructions, be sure to visit the <a href=\"https:\/\/k6.io\/docs\/getting-started\/installation\/\">official k6 website<\/a>.\n<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"org817ffce\">Windows<\/h4>\n\n\n\n<p>\nFor Windows users, k6 recommends using the Chocolatey package manager:\n<\/p>\n\n\n\n<pre id=\"org0ff6ff4\" class=\"wp-block-preformatted\">choco install k6\n<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"org90378ea\">Mac<\/h4>\n\n\n\n<p>\nFor Mac users, k6 recommends using the Homebrew package manager:\n<\/p>\n\n\n\n<pre id=\"orgbb6ed20\" class=\"wp-block-preformatted\">brew install k6\n<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"orgf741573\">Linux<\/h4>\n\n\n\n<p>\nFor Debian\/Ubuntu Linux users, the <code>apt<\/code> package manager is recommended:\n<\/p>\n\n\n\n<pre id=\"orgb2768b2\" class=\"wp-block-preformatted\">sudo gpg --no-default-keyring --keyring \/usr\/share\/keyrings\/k6-archive-keyring.gpg --keyserver hkp:\/\/keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69\necho \"deb [signed-by=\/usr\/share\/keyrings\/k6-archive-keyring.gpg] https:\/\/dl.k6.io\/deb stable main\" | sudo tee \/etc\/apt\/sources.list.d\/k6.list\nsudo apt-get update\nsudo apt-get install k6\n<\/pre>\n\n\n\n<p>\nThe <code>snap<\/code> package manager also works, if you want to avoid adding a new repository to your source list:\n<\/p>\n\n\n\n<pre id=\"org7ce2f2a\" class=\"wp-block-preformatted\">snap install k6\n<\/pre>\n\n\n\n<p>\nFor Fedora\/CentOS users, you can use <code>dnf<\/code>:\n<\/p>\n\n\n\n<pre id=\"org39ae434\" class=\"wp-block-preformatted\">sudo dnf install https:\/\/dl.k6.io\/rpm\/repo.rpm\nsudo dnf install k6\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"running-test-script\">Running The First Test Script<\/h3>\n\n\n\n<p>\nIt\u2019s now time to run your test script.  K6 provides numerous examples you can follow to set up a test scenario.  The test below provides all of the basic conditions you will need to get some good data about your website\u2019s response times under load:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"color: #40B4C4;\">import<\/span> http from <span style=\"color: #B4DCE7;\">'k6\/http'<\/span>;\n<span style=\"color: #40B4C4;\">import<\/span> { check, sleep } from <span style=\"color: #B4DCE7;\">'k6'<\/span>;\n<span style=\"color: #40B4C4;\">export<\/span> <span style=\"color: #40B4C4;\">let<\/span> <span style=\"color: #FFFFFF;\">options<\/span> = {\n  stages: [\n    { duration: <span style=\"color: #B4DCE7;\">'15s'<\/span>, target: 100 },\n    { duration: <span style=\"color: #B4DCE7;\">'30s'<\/span>, target: 100 },\n    { duration: <span style=\"color: #B4DCE7;\">'15s'<\/span>, target: 0 },\n  ],\n};\n<span style=\"color: #40B4C4;\">export<\/span> <span style=\"color: #40B4C4;\">default<\/span> <span style=\"color: #40B4C4;\">function<\/span>() {\n  <span style=\"color: #40B4C4;\">let<\/span> <span style=\"color: #FFFFFF;\">res<\/span> = http.get(<span style=\"color: #B4DCE7;\">'http:\/\/example.com\/'<\/span>);\n  check(res, { <span style=\"color: #B4DCE7;\">'status was 200'<\/span>: r =&gt; r.status == 200 });\n  sleep(1);\n}\n<\/pre>\n\n\n\n<p>Be sure to replace example.com with your actual website hostname.<\/p>\n\n\n\n<p>\nThe section you may want to customize contains the stages of the test:\n<\/p>\n\n\n\n<pre id=\"org2de3c14\" class=\"wp-block-preformatted\">export let options = {\n  stages: [\n    { duration: '15s', target: 100 },\n    { duration: '30s', target: 100 },\n    { duration: '15s', target: 0 },\n  ],\n};\n<\/pre>\n\n\n\n<p> The test conditions as set forth here set up three distinct stages.  Each stage has a duration parameter and a ramping target.  The first stage sets a duration of 15 seconds, over which k6 will create virtual users to send a total of 100 HTTP requests to the URL of your choice.  The next stage will send the same request target but spread over 30 seconds.  The final stage sends out a target of 0 for 15 seconds.  The last leg acts as a sort of cool down period. <\/p>\n\n\n\n<p>\nYou can tweak these parameters to get different results.\n<\/p>\n\n\n\n<p> When it\u2019s time to run the test, open a command line interface in your favorite terminal app, and use this command: <\/p>\n\n\n\n<pre id=\"orgd66600f\" class=\"wp-block-preformatted\">k6 run &lt;filename&gt;.js\n<\/pre>\n\n\n\n<p> The test will begin in your terminal window. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"436\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running-1024x436.png\" alt=\"Running a typical k6 test\" class=\"wp-image-100273\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running-1024x436.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running-300x128.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running-768x327.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running.png 1469w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure><\/div>\n\n\n\n<p>\nYou will see results in incoming lines of text, like this:\n<\/p>\n\n\n\n<pre id=\"orgb41ad96\" class=\"wp-block-preformatted\">running (0m01.0s), 007\/100 VUs, 0 complete and 0 interrupted iterations\ndefault   [   2% ] 007\/100 VUs  0m01.0s\/1m00.0s\n\nrunning (0m02.0s), 014\/100 VUs, 0 complete and 0 interrupted iterations\ndefault   [   3% ] 014\/100 VUs  0m02.0s\/1m00.0s\n\nrunning (0m03.0s), 020\/100 VUs, 0 complete and 0 interrupted iterations\ndefault   [   5% ] 020\/100 VUs  0m03.0s\/1m00.0s\n\nrunning (0m04.0s), 027\/100 VUs, 0 complete and 0 interrupted iterations\ndefault   [   7% ] 027\/100 VUs  0m04.0s\/1m00.0s\n\nrunning (0m05.0s), 033\/100 VUs, 1 complete and 0 interrupted iterations\ndefault   [   8% ] 033\/100 VUs  0m05.0s\/1m00.0s\n<\/pre>\n\n\n\n<p>\nFinally, you see the results.  The line you most likely find most relevant to the test is the response time, labeled <code>http_req_duration<\/code>.\n<\/p>\n\n\n\n<pre id=\"org70e029d\" class=\"wp-block-preformatted\">http_req_duration..............: avg=16.22s   min=3.06s    med=19.14s   max=21.29s   p(90)=20.46s   p(95)=20.72s\n<\/pre>\n\n\n\n<p> Notice you have an average response time, as well as minimum (<code>min<\/code>), median (<code>med<\/code>), and maximum (<code>max<\/code>). <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"663\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_results-1024x663.png\" alt=\"Typical k6 results.\" class=\"wp-image-100270\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_results-1024x663.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_results-300x194.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_results-768x498.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_results.png 1519w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure><\/div>\n\n\n\n<p> Remember, this test is sending HTTP requests.  The amount of your requests your site requires will depend on how it\u2019s coded.  There is the initial request, the loading of stylesheets, images, and other resources.  <b>One goal of site speed optimization is to limit requests wherever possible.<\/b> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"case-study\">Case Study: Testing Two WordPress Sites<\/h2>\n\n\n\n<p>\nFor the test, we are using a VPS with 1 CPU and 6GB of RAM.  NGINX caching has been disabled.  For a cache, we will only be using the base settings of the W3 Total Cache plugin.  One site is running a bare WordPress installation and no caching, the other is running the W3 Total Cache plugin.\n<\/p>\n\n\n\n<p> For the first test, we will run the above k6 test on our bare WordPress install.  We will be keeping an eye on server load and response times. <\/p>\n\n\n\n<p>\nNo cache k6 response times:\n<\/p>\n\n\n\n<pre id=\"orga6e0426\" class=\"wp-block-preformatted\">http_req_duration..............: <strong>avg=15.92s<\/strong>   min=1.54s   med=19.94s   max=22.14s   p(90)=21.09s   p(95)=21.22s\n<\/pre>\n\n\n\n<p>\nCache site response times:\n<\/p>\n\n\n\n<pre id=\"org164b9b8\" class=\"wp-block-preformatted\">http_req_duration..............: <strong>avg=1.15s<\/strong>   min=155.52ms med=980.52ms max=4.9s     p(90)=2.24s   p(95)=2.62s\n<\/pre>\n\n\n\n<p>Note that less than 2 seconds is considered a good response time.  You will notice that the cache site not only results in better response times but also lower server load.<\/p>\n\n\n\n<p>Load average compared: <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"599\" height=\"368\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_test_results.png\" alt=\"\" class=\"wp-image-100269\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_test_results.png 599w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_test_results-300x184.png 300w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure><\/div>\n\n\n\n<p>Now you know how to run load tests with k6. Be sure to leave any questions or comments below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Servers are getting faster and faster, but there are still plenty of websites suffering from poor performance. There are many variables that might cause a website to load slowly, and there are websites that have good load times, but only up to a certain number of concurrent users. How can you find out how many<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/\"> Read More ><\/a><\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4529],"tags":[],"class_list":["post-100268","post","type-post","status-publish","format-standard","hentry","category-performance"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Load Test Your Site With k6 | InMotion Hosting<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Load Test Your Site With k6 | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Servers are getting faster and faster, but there are still plenty of websites suffering from poor performance. There are many variables that might cause a website to load slowly, and there are websites that have good load times, but only up to a certain number of concurrent users. How can you find out how many Read More &gt;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-08T16:28:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-09-08T16:28:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running-1024x436.png\" \/>\n<meta name=\"author\" content=\"Christopher Maiorana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christopher Maiorana\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/\"},\"author\":{\"name\":\"Christopher Maiorana\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f\"},\"headline\":\"How To Load Test Your Site With k6\",\"datePublished\":\"2022-09-08T16:28:28+00:00\",\"dateModified\":\"2022-09-08T16:28:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/\"},\"wordCount\":769,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running-1024x436.png\",\"articleSection\":[\"Performance\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/\",\"name\":\"How To Load Test Your Site With k6 | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running-1024x436.png\",\"datePublished\":\"2022-09-08T16:28:28+00:00\",\"dateModified\":\"2022-09-08T16:28:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running.png\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running.png\",\"width\":1469,\"height\":625},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Load Test Your Site With k6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f\",\"name\":\"Christopher Maiorana\",\"description\":\"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/chris-m-4623144b\/\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/christopherm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Load Test Your Site With k6 | InMotion Hosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/","og_locale":"en_US","og_type":"article","og_title":"How To Load Test Your Site With k6 | InMotion Hosting","og_description":"Servers are getting faster and faster, but there are still plenty of websites suffering from poor performance. There are many variables that might cause a website to load slowly, and there are websites that have good load times, but only up to a certain number of concurrent users. How can you find out how many Read More >","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2022-09-08T16:28:28+00:00","article_modified_time":"2022-09-08T16:28:29+00:00","og_image":[{"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running-1024x436.png","type":"","width":"","height":""}],"author":"Christopher Maiorana","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Christopher Maiorana","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/"},"author":{"name":"Christopher Maiorana","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f"},"headline":"How To Load Test Your Site With k6","datePublished":"2022-09-08T16:28:28+00:00","dateModified":"2022-09-08T16:28:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/"},"wordCount":769,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running-1024x436.png","articleSection":["Performance"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/","name":"How To Load Test Your Site With k6 | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running-1024x436.png","datePublished":"2022-09-08T16:28:28+00:00","dateModified":"2022-09-08T16:28:29+00:00","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/k6_info_running.png","width":1469,"height":625},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/performance\/load-test-k6\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How To Load Test Your Site With k6"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f","name":"Christopher Maiorana","description":"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.","sameAs":["https:\/\/www.linkedin.com\/in\/chris-m-4623144b\/"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/christopherm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/100268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=100268"}],"version-history":[{"count":12,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/100268\/revisions"}],"predecessor-version":[{"id":100284,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/100268\/revisions\/100284"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=100268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=100268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=100268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}