Optimization of LMS for Improving user Response Time

DOI : 10.17577/IJERTCONV3IS15051

Download Full-Text PDF Cite this Publication

Text Only Version

Optimization of LMS for Improving user Response Time

Sabareeshwaran[1] , Muralidharan [2]

Department of Information Technology

Dr. Mahalingam College Of Engineering and Technology Pollachi

Abstract- Moodle is one of the LMS, which is an Open Source. Moodle has serious performance issues where number of participants attempting quiz at same time or collecting feedback from participants, etc. The entire optimization was tested on load testing Moodle system, identifying bottleneck and removing bottlenecks. The major bottleneck while performing load testing was acquiring DBMS lock to update the Moodle sessions table. The major project aim to come up with alternative logging strategy so that session update information is inserted as new record. And deletion is done in bulk so that the logging process works faster. The purpose of this section is to provide the reader with a general, background information and an insight into the web application of Optimized Moodle Learning Management System and is to specify the requirements for policy enforcement framework for moodle. When moodle is being used for conducting quizzes or exams in schools, only the quiz or exam related apps should get open. Any request to start any of the remaining apps should be blocked.

Keywords-Moodle, Open source, MYSQL, LSM


Moodle LMS is an open source software, which is used in

239 countries all over the world. Moodle has a strong support of communities where the experts are involved in the discussion. Moodle LMS has performance issues with respect to user response time. By improving the user response time of Moodle, it is going to be useful for 73.7 Million users and also 1.3 Million teachers, and so on, across the world. User response time can improve in many ways, i.e., by changing the Moodle architecture, hardware or software configuration, database, and so on.

    1. Learning Management System

      Distance education represents the mode of delivering a course of study, in which most of the communication between teacher and student take place asynchronous learning. E-learning is interactive learning, in which the learning content is accessible online, which offers feedback to students learning behaviour.

      E-learning is broadly inclusive of all forms of educational technology in learning and teaching e-learning is useful for students and teachers. It includes computer based learning like conducting online exams, and providing feedback to students, etc., which also tries to remove the time constraints and location constraints. It is suited to distance learning and flexible learning.

      We can say that the process of learning is easy using internet. Students can interact with their instructor 24 hours and seven days per week, via discussion forums, email, chat, and so on. In traditional classroom lecture, content is manually distributed, and once the class is over, the students cant interact with lecturer. E-learning provides the opportunity to the students to communicate with teacher, and as well as themselves. This communication is done through email or using discussion forums or chat rooms.

    2. Moodle LMS

      Moodle is an open source software e-learning platform (also known as Course Management System (CMS), or Learning Management System (LMS), or Virtual Learning Environment (VLE)), which provides educators tools to create a course website.

      It is a web-based Learning Content Management System (LCMS) i.e. a CMS, and LMS, which provides information and collaboration among the Moodle Users such as System Administrators, developers, course designers, etc.

      Some of the reasons for using Moodle are Moodle is Open Source software. This means that anyone can download, and modify Moodle source code according to our needs. Also, we can distribute it, under the same license, Easy to learn and provides high quality online courses. Instructors are sharing documents/lecture materials, graded assignments discussions forums,etc.,among students, Provides good educational tools/plugin, and easy to install and Moodle allows users to post news items, assignments, electronic journals and resources, and to collect assignments, etc.

    3. LMS Features

      LMS softwares are available in commercial as well as open source softwares. Open Source LMSs include Moodle, edX, SAKAI, Web CT, Bscw, Ilias, eduplone, Claroline, ATutor, Dokeos and so on. These open source softwares have wide developer communities, which presents robust arguments for considering open source software, as a straightforward and potentially feasible competitor to commercial products. Commercial LMSs include Blackboard, Desire2Learn, KEWL, Blackboard Learning System, ANGEL Learning Management Suite, eCollege, etc.

    4. Moodle Three Layer Architecture

Moodle can be represented in a three layer architecture

.Moodle distinguishes between code (PHP, HTML, and CSS) and data. Moodle library, modules (such as resources and activities), blocks, plugins, and other entities are represented in the code. This code contains all elements that deal with front-end and back-end operations. Interface is a boundary, across which the systems communicate.

User interface refers to communication between software and human beings. For example, in Moodle, this is what we see and click on the web browser, and in our mail programs. It provides ways for us to access, understand, and change the database at the heart of any Moodle site. The design of such an interface requires collaboration between software. Users makes this user-friendly and maximize overall usability.

Fig 1:Moodle 3 layer architecture

Moodle administrator can change system settings of Moodle courses, roles, groups, and other data, such as learning resources added by teachers, and student involved in discussion forums, chats, and so on. All of these are stored in Moodle database. The pictures uploaded by users, conducted workshop tutorials, uploaded assignments, etc., are also stored in moodle data directory.


Moodle LMS contains some performance issues. According to DBP Moodle system administrator, DBP moodle supports 2500 users at a time for conducting online quiz with configuration of 96GB of RAM, 100 TB HDD. When we run moodle on normal PC then we found that moodle database is using database locks for updating records. We planned to remove those locks from moodle database. These updation is done on moodle session database table which is accessed by user frequently. While updating these, other queries are going to sleep state till

completion of updating session record in moodle session table. We decided to remove those locks so that we can improve Moodle LMS performance.

When we were running 400 users on server then we found the observations which described in figure Most of the CPU(433.9% ) is spend on processing mysql requests. This gave us the basic way to find the bottleneck of Moodle LMS.

Figure 2: CPU usage

    1. Existing Functionalities

      Whenever user try to login to moodle, user session is created in moodle sessions table. In index.php internally calling the moodlelib.php for user-login details which is complete user-logging ($USER). This function internally checks login user details which is described in moodle database.php file and manager.php. Initially manager.php generates session of every user (user can be either guest, admin, student, etc.) in moodle sesion table.

      Figure 3: Moodle session temp table

    2. Logging Module

Each user will have his own username and password though which he can login into the moodle and take up a test or do any other activities regarding courses.

Figure 4: logging module

2.2.1 Categorising

Using the import option in the moodle we can import the files required for the course in any format such as aiken,

Blackboard, exam view, gift format, etc. Here we have used aiken format questions which has been saved with encoding UTF-8 and imported in moodle in order to have the test.

Figure 5: Categorising



      Moodle database schema contains many tables (more than 310 approximately). These tables are a collection of core database tables and the tables which are belonging to each plugin. This Moodle database structure is defined in install.xml file placed under the db folder in each plugin.

      The entire database is defined, edited, and upgraded using the XML system. This XMLDB is the Moodle database abstraction layer which contains the library code and this allows Moodle to interact and accessing the database. Moodle uses ADODB, which is abbreviation ActiveX Data Object. This is the database abstraction library for PHP. For analyzing the Moodle performance, we used different tools like Jmeter, mk-query-digest, and http-load, and so on.

      1. Tables

        The present Moodle database schema has 314 tables and uses InnoDB by default. Other storage engines like MyISAM, Merge MyISAM, etc., are also supported. When you create a table, MySQL stores the table definition in a

        .frm file. These tables are categorized based on type of data they store.

      2. MYSQL Server Architecture

This will help us understand the server in the form of MySQL components. Shows the logical view of MySQLs architecture. In the Figure 4.1, the topmost layer contains services most network based client/server tools or servers need: connection handling, authentication, security, etc.

Second layer consist of query processing, analysis, optimization, caching, and all predefined functions like date, math, time, etc., In this level, storage engine will provide functionalities like views, triggers, etc. The last layer contains the storage engines like InnoDB, MyISAM, Blackhole, etc., The response of storage engines are storing

and retrieving all data stored in MySQL. The server communication is done through storage engine API (Application Programming Interface) only. These storage engines dont communicate with each other, they simply respond to the request from server.

Figure 6: Logical view of MySQL server architecture


For finding the bottlenecks of Moodle, we used the following tools, which are available as open source. Here, we discuss a brief introduction of some of the tools used in Moodle and its usage.

    1. JMeter

      JMeter is a tool, that is extensively used for testing the performance of Moodle under various test conditions. To compare with other servers, extensive tests were done with the default Moodle configuration. JMeter, developed in Java, is an open source desktop application. It is also used for Load testing for analyzing, or simulate a heavy load on a server and measure the performance of variety of services, and it is mainly focused on web applications. Using JMeter, we can perform the test on static and also dynamic resources, i.e., databases, and webservers.

      4.1.1JMeter settings

      Before going to start load testing, following configurations need to be setup for running large number of users. Create configure element which is a .csv data set of username and passwords of users. Accessing these username and password is done by creating variables with USER and PASS. Wherever credentials required define tpese

      variables. JMeter reads data from csv file using these variables

    2. Sesskey

      Figure 7 Sesskey

      Sesskey is randomly generated number while accessing moodle for preventing security attacks like session hijacking. This sesskey is extracted by using regular expressions. Usage of sesskey is shown in figure 7.

    3. PhpMyadmin

      phpMyadmin is used to handle administration of entire MySQL server as well as a single database over the web. For accessing the database, we need to setup MySQL server properly. phpMyAdmin is a free software tool written in PHP. For installing phpMyAdmin, we also need to install web server (Such as LAMP (Linux,Apache,MySQL,PHP)) because phpMyAdmin interface is entirely accessed on browser.

    4. Optimizing Moodle LMS To Improve User Response Time

Web Applications are now required in each and every industry, including business, education,tourism, entertainment and many more. The Objective of our project is to optimize Moodle LMS to reduce average user response time by employing numerous front end and back end optimization techniques.


    1. Front-End Optimization Using Image Maps

      In its simplest form, a hyperlink associates the destination URL with some text. A better alternative is to associate the hyperlink with an image, for example in navigation bars and buttons. If you use multiple hyperlinked images in this way, image maps may be a way to reduce the number of HTTP requests without changing the pages look and feel. An image map allows you to associate multiple URLs with a single image. The destination URL is chosen based on where the user clicks on the image. I have created a set of

      10 pages with image map and another set of 10 pages without image.

    2. Front End Optimization by Using Far Future Expires Header

Browsers (and proxies) use a cache to reduce the number of HTTP requests and decrease the size of HTTP responses, thus making web pages load faster. A web

server uses the Expires header to tell the web client that it can use the current copy of a component until the specified time. Moodle sends requests with an Expires Header which is set in past (20th Aug 1969 09:23 GMT). After changing it to 20th Aug 2015 09:23 GMT .


The following results represents the response time of start attempt page which is taking more time and one more page which is processing page while conducting quiz. And also mentioned that average response time of all the pages while attempting quiz. One of the column represents error rate which is contains the error rate of overall quiz. These details retrieved by running test case individually by changing the number of users.

6.1 Summary Report

This test case run on without optimized moodle by changing number of users.

Figure 8: 50 users run on 2GB RAM in without optimized moodle

Figure 9: 75 users run on 2GB RAM in without optimized moodle

Figure 10: 100 users run on 2GB RAM in without optimized moodle


    1. Conclusion

      We removed the locks successfully on moodle session database table. We did the correctness of our optimized solution using sanity testing. We used tool that is JMeter for load testing of moodle with different parameters, and configure elements like summary report. mk-query-digest tool used for finding number of times that particular sql query was accessed. In place of locks, we used one database table which is used for storing sessdata and at the end,

      we cron temp table into original table. This improved moodle supports approximately 30% of extra users compared to already existed one.

    2. Future Work

Whenever system administrator or instructor wants to check the reports of students then they are able to see either that particular day or all days logs. Instructor or system administrator is not able to see the details of particular range of days. Here, the problem is whenever teacher or instructor selects all days logs, then it retrieves old users details also.

This is unnecessarly retrieving old users(whoever not active in that particular course or semester) which is effecting performnce or it kills the instructor patience. If this option can be done with optimized queries, then this will give good performance.

Moodle sessions are not necessary if we are able to redirect the users whenever they are going to open new tab with moodle page then we no need to maintain sessions. This can be done only when we are going to conduct quizzes or any other thing.


  1. http://dev.mysql.com/doc/refman/4.1/en/slow-query-log.html. [Online; accessed 3 October 2014].

  2. http://www.maatkit.org/doc/mk-query-digest.html. [Online; accessed 2September-2014].

  3. http://docs.phpmyadmin.net/en/latest/. [Online; accessed 5 th-August


  4. Sessionhandling.http://docs.moodle.org/26/en/ Session_handling, Accessed on 21st April 2013.

  5. Jmeter tool. http://jmeter.apache.org/, 2001. [Online; accessed 15- July -2013].

  6. Jmeter tool. http://jmeter.apache.org/, 2001. [Online; accessed 2- October -2013].

  7. A. Al-Ajlan and H. Zedan. Why moodle. In Future Trends of Distributed Computing Systems, 2008. FTDCS 08. 12th IEEE International Workshop on, pages 5864, 2008. http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4683115, Accessed on 15th July 2013.

  8. Cansu Cigdem Aydin and G Tirkes. Open source learning management systems in e-learning and moodle. In Education Engineering (EDUCON), 2010 IEEE, pages 593 600. IEEE, 2013.

  9. Sadanand Y Bansode and Rajendra Kumbhar. E-learning experience using open source software: Moodle. DESIDOC Journal of Library & Information Technology, 32(5) ,2012. http://ieeexplore.ieee.org/Xplore/home.jsp, Downloaded on 20th June 2013.

  10. Tao Chen, Arif Khan, Markus Schneider, and Ganesh Viswanathan. iblob: Complex object management in databases through intelligent binary large objects. In Alan Dearle and RobertoV. Zicari, editors, Objects and Databases, volume 6348 of Lecture Notes in Computer Science, pages 8599. Springer Berlin Heidelberg, 2010.

  11. Ludmila Cherkasova. Scheduling strategy to improve response time for web applications. In Proceedings of the International Conference and Exhibition on HighPerformance Computing and Networking, HPCN Europe 1998, pages 305314, London, UK, UK, 1998. Springer-Verlag.

  12. Francisco Corbera, Eladio Guti´errez, Juli´an Ramos, Sergio Romero, and Mar´a A Trenas. Developing an effective and efficient elearning platform using open source software. In ACM SIGCSE Bulletin, volume 40, pages 349349. ACM, 2008.

Leave a Reply