how does the post data file have to look like for doing an AB test using post data? (The file I have to provide with the -p option)
What is post data? ..and the -p option to what?
So far I did some benchmark tests with different numbers of total requests and concurrent requests. But IMO this simply tests the apache webserver, since these are static requests. With the -p option and a post file (for instance the moodle login page) I would be able to make a benchmark test which involves a larger part of the infrastructure: apache, mysql, php, moodle.
And this is basically what I am interested in: How performant is my current installation (as a whole) and not only how fast does apache serve static documents with the current httpd.conf and hardware.
At least these are my ideas...
Has anyone tried? Please help!
Benchmarking Moodle is a broad topic. One can benchmark each of the components OS, web server or database server. The starting point for that is here http://docs.moodle.org/en/Performance You'll find a lot of other pointers in this discussion http://moodle.org/mod/forum/discuss.php?d=102978
That approach won't tell much about what the final Moodle installation will deliver. The solution is to run a Moodle-specific benchmark. See for example http://moodle.org/mod/forum/discuss.php?d=57028 (Warning: There may be side effects. Run this script on a test installation.) There are many discussions in this forum on this topic. See for example http://moodle.org/mod/forum/discuss.php?d=103040
Actually what I am basically trying to findout is how much resources Moodle consumes in my installation. This includes the interaction of Moodle with the web server and the database server. I looked at the discussions as well as that document. I wonder how the numbers and the parameters in that doc was found. I would like to know the tools or methods that were used.
The 'perspective' script mentioned in discussion forum does not show how much system resources being used.
These are ultimate questions I m looking answers for:
1. how many users can simultaneously submit a quiz without overloading the web server/ database server?
2. what will be the maximum load the Moodle installation can handle?
3. what mix of Moodle functions apply more load on servers?
4. what is the loading time of Moodle pages at average and peak loads?
5. what system resouces are the major bottlenecks of the Moodle intallation?
I am looking for a good methodology to find answers for these questions. I thought applying load on Moodle using a tool like AB will give necessary data.
Your comments on this approach is highly appreciated.
Thanks and Regards!
The answer to all your questions is simple, and sweet: *It dependes.*
Seriously, take questions 1, 2, 4 and 5:
Diversity level 1. On what hardware? What network?
Level 2. All the software layers below Moodle: operating system, webserver, database, php, and how they are configured/tuned.
Level 3. Moodle itself. Version, components being used, role model being used, ...
Level 4. What users? What sort of courses? What activities? Patterns of use.
The best solution for you is to test your own setup!
Thanks for the line of thoughts you have given. Of course I have the details for Level 1, 2 and 3 which I have considered in my study. What I am concerned about now is the methodology for my study not the answers for the questions that I posted.
I run RHEL4, Apache 2.0 , MySQL 4.1 and PHP5 on IBM xseries server
Level 4: I took HTTP access logs and Query log of the Moodle server and analyzing it at 3 stages to understand following -
2. Moodle activities: extract URLS related to Quiz, Assignment, Forum,...
2. User sessions: identify time gaps between requests and arrival time between sessions
Then trying to apply identified pattern of load into server and measure memory, cpu, disk access...etc
To apply loads only I thought of using AB. Don't you think AB is inbuilt tool good for this purpose? I would really appreciate if anyone can tell your experience, tools, concerns you had in similar type of studies...
> I have the details for Level 1, 2 and 3 which I have considered in my study
You have to take my posting for its face value! It wasn't supposed to be exhaustive in any way, just a casual line of thought.
If we were to follow that line, what you say is, levels 1-3 are given for you. Your work concentrate on level 4. The approach is to observe a specific Moodle server, get the usage patterns and then simulate those patterns in other servers, preferably with Apache Bench.
The first obvious question: Why that specific installation?
Bit more complicated: How do you take into account the dynamic, authenticated nature of Moodle?
Almost forgot, what are the aims of the study?
>Why that specific installation?
This installation is operational and very important to a particular institution. But no one exactly knows to answer what load that installation is capable to handle when it is used for Moodle activities. Users always ask the questions like "we need to do a quizz for X number of people can your system handle it?"
Sometimes complaints come that pages are slow to load. When conduct quizzes sometimes end up in database error.
These issues raised the need to study this installation and more than anything i like to learn how to find answers.
>aims of the study?
Find what load/ number of users that system can handle when doing different activities.
How much resources (memory/ cpu/ disk IO..etc) needed to handle maximum possible load?
>The approach is to observe a specific Moodle server, get the usage patterns and then simulate those patterns in other servers, preferably with Apache Bench
Yep!! But not to simulate in other servers. Need to simulate on the same server for now. (But the methodology and usage patterns can be used for other servers if needed. )
Actually I take past usage records of the installation, extract different types of usage patterns and simulate them in a controlled manner on the same installation. While simulating I can change certain configurations and check how they affect the performance.
>How do you take into account the dynamic, authenticated nature of Moodle? ....
Hope that when look at database querying capability this matter is covered to some extent. Won't it?
I gave a URL that asks for a course page to AB tool and looked at MySQL query log. So I observed that AB's request cause MySQL queries too.
But I wanted to try requesting Moodle login page. There came the need to give POST data to AB tool.
I am newbie to performance tuning and benchmarking. So would like to have feedback from Moodlers on what I am doing and how my approach is. Also I am still looking for better tools to do above task.
I really appreciate the thoughts you provide over here. Sorry again for the wording if they sound rude...
The "wording" issue is bound to happen in a time-multiplexed forum discussion like this. It's no problem at all.
In general projects of this sort one needs to plot the system load against what it delivers. The former is easy, at least on Unix. There are plenty of tools for that. The latter is the difficult one, one would like to have the number of users as the unit. But then what is a user? How do they overlap in time? Go through the discussions in this forum, for example http://moodle.org/mod/forum/discuss.php?d=93590
Then you need your automated test or script or whatever which is going to load the system artificially. Or you follow the "Perspective" path, run a set of general benchmarks and convert that into no. of users.