How to load test your Moodle server using Loadstorm

LoadStorm Moodle

Note: this post is part of the Oktobertest series

Using this step by step ‘how-to’, you will be able to test how well your Moodle installation would be able to cope with a certain amount of users, using the service. Whilst this is not a perfect representation of what real life usage of your Moodle installation would be like, it will still give you a very good idea of whether your system is good enough to run Moodle for your expected number of users.

Loadstorm is a web based load testing service. Their business is to simulate multiple virtual users simultaneously navigating a website, following a scenario that you pre-recorded using the loadstorm point and click interface.

This tutorial will show you how to test your Moodle installation with 25 simultaneous users, as you get 25 lifetime free virtual users with loadstorm. It also turns out to be the maximum number of students I have in my classes. If you would like to test with more users, you would need to purchase extra virtual users. I have found the service to be very good value and the support top-notch.

Warning – This tutorial is for Moodle 1.9 but the steps for Moodle 2.x are virtually the same.


Before starting this tutorial, you should download the following files:


Step 1: Upload test users to Moodle


  • Note: You must be logged in as an administrator
  • Site Administration > Users > Accounts > Upload users
  1. Choose file > Select file > Select the mdl_users CSV file you downloaded prior to starting this tutorial
  2. Do not change any of the default values
  3. Click on ‘Upload users’
  1. Check that the data has been uploaded correctly
  2. Do not change any of the defaults
  3. Click ‘Upload users’
  • You will get a report of all users that have been created. Click ‘Continue’
  • Note: Don’t forget to enroll those newly created users into the course you want to use for loadtesting.

Step 2: Upload loadstorm.csv file to your loadstorm account


  • Scroll down to the bottom of the page ‘Form Data Sets’
  • Click on ‘Upload data’
  1. Enter ‘Moodle users’ in the ‘Label’ box
  2. Click ‘Choose’ – Go and select the ‘loadstorm.csv’ file you downloaded prior to starting this tutorial
  3. Click ‘Upload’
  • Your file is now ready to be used

Step 3: Build a load test plan


  • In the ‘Build’ tab, click on ‘Add plan’
  • A ‘plan’ is a collection of ‘scenarios’ in loadstorm. More on this in the steps below
  1. Use a name that you can easily understand, as you might use many plans in loadstorm
  2. Again, your description should be as detailed as possible
  3. Click ‘Save’ when you’re happy with your form

Note: You can always edit the name & description of your plan


Step 4: add a scenario to your plan



A ‘plan’ is a collection of ‘scenarios’. A ‘scenario’ is a series of steps that a virtual user will follow on Moodle. For example, you could have one scenario where a user logs in, looks at the homepage and then logs out (scenario 1); Another scenario could be a user logs in, visits a course, answer a quiz and then logs out (scenario 2). The more scenarios you have in a plan, the more realistic your load testing will be. You can then assign a weight for each scenario so that it further ressembles how Moodle is actually used in your organisation. For example, one could argue that scenario 1 mentioned above would take place a lot more often than scenario 2. You could set a weight of 90 to scenario 1 and 10 to scenario 2 to reflect that.

For the sake of simplicity, we will only create 2 scenarios in this tutorial.

Scenario 1 with a weight of 40:

  • User looks at the homepage
  • Logs in
  • Downloads a 500KB resource
  • Logs out

Scenario 2 with a weight of 60:

  • User looks at the homepage
  • Logs in
  • Downloads a 500KB resource
  • Views a forum
  • Answers a forum post
  • Posts a blog post
  • Logs out

Click ‘Add Scenario’


1 & 2. Be as descriptive as possible
3. Assign the weighting you have decided to allocate
4 & 5. This is the minimum/maximum amount of time a virtual user would wait between steps (or ‘clicks’ in the real world). The actual time will be picked randomly by loadstorm for every step and every virtual user, between your chosen minimum and maximum values. If you want to put maximum strain on your server, you should try and keep those values as low as possible.
6. Make sure the correct CSV file is selected
7. Leave both boxes ticked so that your test is as close to real life as possible
8. Click ‘Save’

  • Check that all the options are correct and click ‘Add step’

Scenario 1, action 1: Visit the homepage



Warning: If this is your first time using loadstorm you will need to verify your server using the ‘Add a new server’ link. As I have used it before I cannot show you how to do that but there is a good tutorial at

  1. Leave this as ‘/‘ if your moodle is accessible via an address such as My Moodle installation is accessible at hence the need for me to add ‘/version19′
  2. Select the correct server. Please see the warning note above if it is the first time you are using loadstorm
  3. Click ‘Save’


  • Loadstorm will open the page so that you can check the step was performed correctly
  • Click ‘New step’

Scenario 1, action 2: Login to Moodle


  1. The ‘Login’ page of Moodle is located at Fill in the correct information for your server
  2. Click ‘Save’
  • Click ‘New step’ when the preview shows up
  • You will now need to tell virtual users what usernames and passwords to use to login. 
  • Check that your values match the ones circled in red above
  • Click ‘Save

Scenario 1, action 3: Visit the Load Testing course


  1. Select ‘Click a link’
  2. Look for and select ‘Load testing course’ (or whatever else course you want the virtual user to access)
  3. Click ‘Save’
  • Check that the step has been successfully created and click ‘New step’

Scenario 1, action 4: View a 500KB image


  • Select ‘Click a link’ and then scroll down to the correct resource
  • Click ‘Save’
  • Check that the step was successfully created and click ‘New step’

Scenario 1, action 5: Logout


  1. Select the ‘Click a link’ option
  2. Select the ‘Logout’ link
  3. Click ‘Save’
  • Check that the step was successfully created and click on the name of your plan (or the ‘build’ tab).
  • Well done, your first scenario has now been created.

Step 5: Add scenario 2


  • As for scenario 1, make sure you are as descriptive as possible. Note that I have added a weight of 60 to this scenario. Scenario 1 has a weight of 40, therefore the weight of both scenarios equates to 100.
  • Check that the details are correct and click ‘Add step’
  • Note: We could have copied scenario 1 and edited it, but as this is a tutorial aimed at very beginners, repetition of steps is a good way to learn.

Scenario 2, action 1: Visit homepage


  1. Leave this as ‘/’ if your moodle is accessible via an address such as ‘
  2. Select the correct server. Please see the warning note above if it is the first time you are using loadstorm
  3. Click ‘Save’
  • Note: After each new step you have created, you will receive a message telling you that the step was created successfully. To keep this tutorial as succinct as possible, I have removed those screenshots for scenario 2. Simply click on ‘New step’ whenever that screen shows up

Scenario 2, action 2: Login to Moodle


  • Make sure your options are similar to the ones shown in the image above

Scenario 2, action 3: Visit the Load Testing course


  1. Select ‘Click a link’
  2. Look for and select ‘Load testing course’ (or whatever else course you want the virtual user to access)
  3. Click ‘Save’
  • Click a link > Choose the right file > Click ‘Save’

Scenario 2, action 4: Return to course homepage



Scenario 2, action 5: View a forum


  • Click a link > Look for ‘Forum – Standard’ > Click ‘Save’

Scenario 2, action 6: Post a forum message


  • Make sure your details are the same as above
  • Make sure your details are the same as above

Scenario 2, action 7: Return to course homepage


  • The previous step will have returned a message that prevents you from clicking on any links so you’ll have to copy your course URL. The URL to a course is always something like
  • Simply change ‘somenumber’ to the correct number for your course. Look in your browser address bar to find out what your course ID number.

Scenario 2, action 8: add a blog post


  • Click a link > Look for ‘Add a new entry’ > Click ‘Save’
  • Note: you must have the ‘Blog’ block on your course page for that link to show up.
  • Copy the details as above

Scenario 2, action 9: Logout


  • Click a link > Find ‘Logout’ > Click ‘Save’

Step 6: Add a new load test


  1. Click on the ‘Build’ tab
  2. When you have checked that the steps are correct, click ‘Add scenario’
  1. Ensure the right plan is selected
  2. Schedule when your test should be run, or simply tick ‘Start load test as soon as possible’
  3. Be as detailed as possible in your description
  4. These settings are self-explanatory. To replicate real classroom use, I like to use the same figure for ‘Start users’ and ‘Peak users’
  5. Click ‘Save’

Step 7: Understand the results



Both graphs show the progression for the entire duration of the test. The example test we ran was 30 minutes long, and this is represented on the X axis.

Graph 1:

  • Throughput: amount of kilobytes per second transferred between your server and the virtual users. Please note that it is bytes, and not bits. This is important as your web hosting company will probably will mention their network throughput in bits, not in bytes. If you would like to convert the throughput shown in this graph against your theoretical server throuput, you would have to multiply the peak number by 8. In this example, the peak throughput was 650KBps or 5200Kbps – which translates as 5.2Mbps.
  • User load: The amount of virtual users completing the scenarios at any given time. Note that there is no scale for this data so you have to over your mouse on the graph to find out the exact data. Our example test started with 15 users and finished with 25 users in increments of 1.
  • Requests per seconds: depending on how you setup your scenarios, virtual users will wait for a random period of time between each ‘click’ (or step). As the time they wait is random, the graph is an easy way to find out how many requests per second your server received during the test. The shorter the wait between steps, the more requests per seconds your server would receive.

Graph 2:

  • Response time, average: shows how long it takes for your server to respond to the request. As far as I understand it, this metric does not reflect how long it takes for a page to fully load.
  • Response time, peak: it won’t always take the same amount of time for your server to respond to requests.
  • Error rate: if a page is not accessible for whatever reason, loadstorm would record it as an error. In this example, there were no errors. Errors should be taken very seriously as a healthy server should never return any errors. Errors could be returned if the server is overloaded. You should download the CSV file for detailed results (see below) and also look at your webserver error logs to find out more.

Note: Click on ‘Click here for details…’ link to get access to useful reports


Step 8: Dig further


Step 9: Dig further
  1. When looking at a specific report, you can click on ‘Download as CSV’ – This will show you results for every individual requests

Looking through the individual results would allow you to zero in on specific issues or find out where your server ‘breaking point’ is at.


About Frederic Nevers

I have been a Moodler since the early days – 2005. I am now a Digital Learning Integrator and have been helping other teachers integrate Moodle in their teaching since 2007.
I have been involved in the classroom since 2002, teaching ICT and French to students aged 11 to 18 years old. I have experience teaching the (I)GCSE, IB MYP & DP and A programmes.


    1. Hi,
      I host those files on a different server, and I’ve just noticed it failed. I need to look into old backups. I’ll put them on again when I’ve found them. Thanks for reporting.

    2. handsome:”我覺得Erica說: 我 知 道 一 定 有 人 會 咒 罵 我 大 小 姐 嬌 生 慣 養 都係因為近日有部分留言者的反智思想才會說出來,haha真諷刺!”—-you are right… references were poetsd at my 逼地鐵blog post.chan tai man:”何解 反正說自己怕冷 會被人說是嬌生慣養扮大小姐 說自己不怕冷 又會被人說是扮勁 如果說自己 ( 有時怕冷有時很強壯 ] 可能又被指作狀”—-真好 有人知道我的苦處 pakman:thank you so much. people have been telling me about this article, but i seldom buy this magazine.原來凍都有共鳴 應該都是女性吧

    3. This solution is based off of the prptsmeuion that my character, like myself, has all or many of the skills related to an outdoor skills certification:I would load up my car with dry food and water. I would then go down to the local convenience store/thrift shop and buy a sleeping bag, pocket knife, matches, and if possible, a firearm with the money reserved for the apartment’s rent that month. The firearm is a convenience, it is not required yet.After I have all of my supplies I would head to the mountains with a few of the people I hang out with from time to time (as mentioned in the last article) with similar gear and skills. At this point We would set up a camp in the mountains around Mt. Hood, accessed via Oregon’s route 26. Our group would have one person at any given time watching the equipment and biding our time for more news.When/If bad news on the zombies came, we would retreat to this campsite for a few months, the most dangerous thing in the world at that point would be other human beings who are scared and desperate.Then we play the waiting game To be continued when new conditions are given by Waldodude Kevin M.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>