Jmeter output - no slash between host and sitepath

Jmeter output - no slash between host and sitepath

by Diane Soini -
Number of replies: 4

I'm trying to set up jmeter testing  (on centos) and am having some trouble with the test runner.

I'm looking at the output in runs_outputs/[datetime].output and it appears that all the requests that are being made have no slash between the host and the sitepath. i.e. the URL attempted for login is https://123.456.789.012moodle-performance-comparison/moodle/login/index.php.

I have tried manually modifying the jmx file so that there are more slashes either on the sitepath variable or elsewhere, but that appears to have no effect.

Is this a known problem? Have you managed to solve it?

Average of ratings: -
In reply to Diane Soini

Re: Jmeter output - no slash between host and sitepath

by Mathew Gancarz -
Picture of Core developers

Hi Diane, I don't remember running into a problem like that. Here are some of my results from an old CSV file output of the test results:


<?xml version="1.0" encoding="UTF-8"?>
<testResults version="1.2">
<httpSample t="2761" lt="571" ts="1361396770114" s="true" lb="[BROWSE RESOURCES IN COURSE 440] Login to site" rc="200" rm="OK" tn="[BROWSE RESOURCES IN COURSE 440] 1-8" dt="text" by="838591">
  <httpSample t="571" lt="571" ts="1361396770114" s="true" lb="http://app.testserver.com/learning_staging/login/index.php" rc="303" rm="See Other" tn="" dt="text" by="1381"/>
  <httpSample t="143" lt="143" ts="1361396770686" s="true" lb="https://app.testserver.com/learning_staging/login/index.php?testsession=5105" rc="303" rm="See Other" tn="[BROWSE RESOURCES IN COURSE 440] 1-8" dt="text" by="1007"/>
  <httpSample t="557" lt="163" ts="1361396770829" s="true" lb="http://app.testserver.com/learning_staging/my/" rc="200" rm="OK" tn="[BROWSE RESOURCES IN COURSE 440] 1-8" dt="text" by="29168"/>

The server name in the HTTP Request Defaults is shown as "app.testserver.com"

and the path in the specific HTTP Requests is for example: "learning_staging/login/index.php"


Inspecting the .jmx file, the path properties for example:

<stringProp name="HTTPSampler.path">learning_staging/login/index.php</stringProp>
In reply to Mathew Gancarz

Re: Jmeter output - no slash between host and sitepath

by Diane Soini -

I figured out what the problem was. I needed to edit the generated script so that the protocol was set. It was hitting all the URLs as http, then the server was redirecting them back to https to the front door.

I've run into a lot of other problems though, but I'm not sure if the moodle community can help.

I run out of memory (java heap space) and disk space trying to run tests with 100 users and trying to run more than one test. Mysql failed because there was no more disk space. I've separated the server running moodle and the server running jmeter plus I've got external volumes for the jmeter output files and moodle files (guess I need an external volume for the mysql files, too) and still have these problems. I also made the change to the java heap space argument in the jmeter script but I still get errors running more than 1 loop of 100 users.

It's making me wonder how on earth do you set up an appropriate testing environment when it seems to use more resources than our production environment that serves a large university with tens of thousands of users every day.

In reply to Diane Soini

Re: Jmeter output - no slash between host and sitepath

by Mathew Gancarz -
Picture of Core developers

I was running it on windows but I do remember running into issues with performance and running out of memory, though not out of hard drive space. My tests of 100 concurrent users are about 5-10 MB for the CSV log file, but if I remember correctly, RAM use was several GB.

Is it the Moodle MySQL failing because of lack of disk space? How much space did it use up? The only significant space usage I can think of generated by testing would be log files and maybe some forum posts or quiz attempts but that should all be fairly negligible?

When I was doing 100 user testing, I broke out several activities and setup something like the below for each type:

Browsing Resources in a Course

  • This test consists of a user logging into the site, viewing a course page, viewing a course syllabus (PDF), viewing a page of resource links and logging out from the site
  • 25 Test users were used, with 4 seconds between each user starting their actions, with the whole 'script' looping 2 times for each user
  • A Gaussian Random Timer was used between each step, delaying each next activity by 1 second + a random value between 1-3 seconds, giving a random delay of 1-4 seconds before each next step was taken

Interacting in a Forum

  • This test consists of a user logging into the site, viewing a course page, viewing a forum within a course, viewing a random discussion within a forum and replying to the discussion with a boilerplate text, repeating once more to view a random discussion and post and then logging out from the site
  • 25 Test users were used, with 5.6 seconds between each user starting their actions, with the whole 'script' looping 2 times for each user
  • A Gaussian Random Timer was used between each step, delaying each next activity by 1 second + a random value between 1-3 seconds, giving a random delay of 1-4 seconds before each next step was taken

In reply to Mathew Gancarz

Re: Jmeter output - no slash between host and sitepath

by Diane Soini -

As I've fooled around with this I've run out of space for every part of the process: logs, database, test run outputs, the backup files, everything. I've separated everything into as many separate partitions as possible and that seems to help.

I'm using the generated jmeter test but I have added a progress bar block to a small course to see what happens. I want to add it to a large course and have all the test users hit the course page with the progress bar on it. I've found the progress bar hits the database pretty hard in real life. But so far I get a while screen of death trying to add the progress bar to a large course so I'm not sure having one user hit the progress bar on a small site will be enough of a stress.

I did a quiz at one point but that doesn't seem to use many resources. In real life we had a catastrophe when a large course was taking a quiz and many people hit the exam timeout time so all the submissions were sent at once. We had table-locking that went on for over 30 seconds, causing timeouts and freaked out students and professor (it was the final exam). I have no idea how to test something like that. Writing a quiz and a test that will have everyone submitting answers at the same time right at the quiz timeout seems a bit impossible.


So, long story short, the more I break everything up the better it works. I am currently running a test with 1000 users and so far so good. No heap space errors yet. No database or logs eating up all the space.