Moodle 1.7 Quiz Handles 300 Simultaneous Users on One Server

Moodle 1.7 Quiz Handles 300 Simultaneous Users on One Server

Don Hinkelman
Number of replies: 8
Particularly helpful Moodlers 사진 Plugin developers 사진
On April 5, 2007, Sapporo Gakuin University gave an English Placement Test (available upon request) to all its 1050 incoming freshmen to stream them into a foreign language program. The fifty question quiz was administered in five sessions with up to 300 students taking the test at one time.
**Results were excellent**
—details below. A following post gives some software settings on our LAMP server.

Quiz Module Configuration:
  • 50 multiple choice questions with 34 audio files (sizes ranging from 50kb to 1mb)
  • submit once at end (no submission after each question)
  • shuffled answers, no timer, no other special settings
  • button for “Save without Submitting” disabled (see hack on this forum)

Quiz Administration
  • Five 60 minute sessions, twenty minute breaks between for rebooting
  • Up to 300 students logged in together over a one minute period (highest load)
  • Submitted answers individually over final 20 minutes.(not so high load)

Server & Network Hardware
  • 100MB LAN connections (all inside campus)
  • Dell SC1420 Server, 2.8ghz Dual Xeon, US$1800 including memory upgrade
  • 4GB memory, 80GB IDE hard disk

Client Software & Hardware
  • Windows 2000Professional with Internet Explorer 6
  • 600mhz Celeron CPU, 256MB memory

Server Software
  • Linux: CentOS 4
  • Apache 2.0.59 (complied from source code)
  • MySQL-server-standard-4.1.22-0.rel4(rpm)
  • PHP 5.2.1 with eAccelerator 0.95

Client Operation Times
  • Remote booting time took about 5 minutes with batch program to load IE & Moodle
  • Moodle login time: about 5-10 seconds
  • Quiz opening time: less than 2 seconds
  • Quiz saving time: 3-5 seconds

Quiz Scores and Analysis
  • Excel Download from Overview **Failed**—only first 50-100 processed, 70% of data missing/corrupted. Perhaps the script was unable to handle 500+ records, or unable to handle double byte characters.
  • Workaround: Text Download from Overview was OK, which was then converted to Excel manually.
  • Item Analysis **Failed**: got this error message... Fatal error: Maximum execution time of 30 seconds exceeded in /usr/moodle/ptest17/question/type/multichoice/questiontype.php on line 29
  • Any advice on how to overcome these two problems would be appreciated.
Network Traffic, Netstat, CPU usage,
System load, Memory usage, Apache processes

  • see linked document here
  • these results show that our system could potentially handle over 1000 simultaneous users with audio files
평균 등급 :Useful (3)
In reply to Don Hinkelman

Re: Moodle 1.7 Quiz Handles 300 Simultaneous Users on One Server

Don Hinkelman
Particularly helpful Moodlers 사진 Plugin developers 사진
Apache Settings

As an appendix to our main report above, here are some apache settings that may be useful reference. In compiling our build, we tried to limit the number of modules installed to make apache as light as possible. You can see the modules included below. You should not copy these settings directly as many of them relate to our specific hardware and software. Use as a guide. Also, we do not know exactly why our quiz operation results were so good, so if you notice a particular setting that could explain why we had good success, please tell us here. Thanks! Don

Basic Data

[root@elearning conf]# /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.59
Server built: Mar 2 2007 15:43:17
Server's Module Magic Number: 20020903:12
Server loaded: APR 0.9.12, APR-UTIL 0.9.12
Compiled using: APR 0.9.12, APR-UTIL 0.9.12
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"


httpd.conf

<IfModule prefork.c>
StartServers 50
MinSpareServers 5
MaxSpareServers 20
ServerLimit 300
MaxClients 300
MaxRequestsPerChild 4000

</IfModule>
# KeepAlive: Whether or not to allow persistent connections (more than
KeepAlive Off
# MaxKeepAliveRequests: The maximum number of requests to allow
MaxKeepAliveRequests 100
# KeepAliveTimeout: Number of seconds to wait for the next request
KeepAliveTimeout 15


#Modules

LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule php5_module modules/libphp5.so

평균 등급 :Useful (1)
In reply to Don Hinkelman

Re: Moodle 1.7 Quiz Handles 300 Simultaneous Users on One Server

Ken Wilson

Hi Don

Assuming that the server has not been restarted, I was wondering if you would be able to post back (as an attachment) the mysqlvars.txt output file from this command: mysqladmin -u root -p var ext stat > mysqlvars.txt. It would be very useful to know what exactly happened on your database server while the quiz was taking place. Also, can you attach the output from the "top" command.

I'm starting to take a good look at the data you've provided - at first glance it looks like the high value for StartServers to prefork is a good strategy as it reduced apache server loading. As for the item analysis failure, try increasing the max_execution_time in php.ini (apache restart is needed after this) and turn on the slow query log to see if it is an expensive database query.

Thanks

Ken

In reply to Ken Wilson

Re: Moodle 1.7 Quiz Handles 300 Simultaneous Users on One Server

Don Hinkelman
Particularly helpful Moodlers 사진 Plugin developers 사진
Hi Ken,

Here are the mysqlvars.txt and top.txt output files for your review.
  • mysqlvars.txt (server has not been restarted, but we had test on April 5, so it was 6 days ago)
  • top.txt (the runlevel of our server is 3, multi user, no GUI)
By the way, for those interested, the name of the server analysis software is "HotSaNIC". http://hotsanic.sourceforge.net/ It is a frontend of RRDTool with SNMP.

Cheers and thanks for the item analysis advice,
Don
평균 등급 :Useful (1)
In reply to Don Hinkelman

Re: Moodle 1.7 Quiz Handles 300 Simultaneous Users on One Server

Tim Hunt
Core developers 사진 Documentation writers 사진 Particularly helpful Moodlers 사진 Peer reviewers 사진 Plugin developers 사진
Thanks for sharing this data with us. Very interesting.

There are known problems with with the library we use for Excel export and Unicode, and sadly, it seems there is no easy answer.

I don't know why the item analysis report is failing. Well, presumably it is trying to process too much data with an algorithm that is not efficient enough, but I have never looked into that report in detail, and I am not likely to have enough time to do so now. Sorry.
In reply to Tim Hunt

Re: Moodle 1.7 Quiz Handles 300 Simultaneous Users on One Server

Jit San Chia
Yes, I have problem doing Excel export too when my course language is forced to be Chinese. A simple workaround I use is to change the language to English first before exporting. After that, change the language back to Chinese. The Excel document exported this way looks Ok.
In reply to Don Hinkelman

Re: Moodle 1.7 Quiz Handles 300 Simultaneous Users on One Server

Chris Ainsworth

Hi Don .... nice to see you still plugging away with it all.   Great work and it does set the example of reporting on system configs and performance.

It would have been an interesting exercise Don to have split the groups into 2 x 150 and done this on 2 different server configurations, say the Windows box you have and say a single processor Linux box or even windows box and look at the comparisons.  It would have been interesting to see a comparison also on the cluster we have down here  - from the 2005 Aust Moodle conference.  

Anyway a GREAT report Don.  

In reply to Don Hinkelman

Re: Moodle 1.7 Quiz Handles 300 Simultaneous Users on One Server

Jean-Michel Védrine
Hello,
Having done some work and bugfix in the past on the item analysis report, I am interested to look at the problem.
The first version of this report has a lot of problem when student's number increased but I was thinking that this problem was solved when bugs MDL-4303 and MDL-4345 were resolved.
So can I ask :
  • if any other Moodle user has problem with item analysis report and a lot of students
  • if you can look at your mod/quiz/report/analysis/report.php file version and report it here
The problem for me is that I don't really have "big" quizes to study the problem (my biggest quiz has 92 students and 177 attempts and the item analysis report is loading in less than 3 seconds on a shared server).
Of course, item analysis will always be slower than overview or responses because there is a lot more work to do.

For the Excel download problem there is currently only 2 solutions
- switch to english (or another isolatin, french is fine too grand sourire) language as already suggested (provided the $CFG->latinexcelexport setting is set to true)
- use ODS export (Moodle 1.8 new feature)
In reply to Jean-Michel Védrine

Re: Moodle 1.7 Quiz Handles 300 Simultaneous Users on One Server

Don Hinkelman
Particularly helpful Moodlers 사진 Plugin developers 사진
Hi Jean-Michel,

Thanks for working on the item analysis reports.

"The problem for me is that I don't really have "big" quizes to study the problem (my biggest quiz has 92 students and 177 attempts and the item analysis report is loading in less than 3 seconds on a shared server)."

You are welcome to access our quiz site (still full of 500+ student data). I can make you an admin and you can turn debugging on to see the problem. Please contact me directly for login information.

Cheers,
Don