We are trying to have approximately 180 to 250 students login to Moodle and take a quiz during a class period. However, teachers are reporting that when all the students go to login it takes 5 minutes or longer for them to login at the beginning of the hour. After monitoring the situation I have noticed that the CPU spikes extremely high on the server during this period. (90% CPU average)
The server is running Windows 2003 Server on dual Intel Xeon 2.33 Ghz dual-core processors with 4G of RAM. The RAM usage and the bandwidth graphs all seem normal. Moodle is running on IIS 6.0 and Mysql 5.0.45 is running on the same box and the authentication method is LDAP from Active Directory.
I am running version 1.7.2, but plan on upgrading to 1.8.3 to see if it resolve the issue. I have tried checking “Enable Record Cache” and “Use database for session information” but those also don’t seem to make a difference either. I have looked at few whitepapers on “Maximizing IIS Performance” and have increased the number of worker processes to 4, but that did not seem to help. When I look at Moodle articles on performance there seems to be many different settings to adjust. I have read a few suggestions about installing APC or disabling “Recycle worker processes”. Rather than continuing to try random settings, I was curious to see if anyone had a suggestion on a logical order of further troubleshooting steps to try.
Here is some graphs of data I have been able to collect:
A few suggestions
- Make sure you are running APC or eaccelerator, and that it is active & enabled
- Chances are you are hitting swap - what do the memory usage / swap usage stats say during the spikes?
- v1.8.3+ heavily recommended... but v1.9 is what you actually need -- on top of the usual fixes, I've spent well over a month working only on performance for v1.9, with a lot of help of several other devs.
- When the spikes hit, what is the split in cpi between IIS and MySQL? Either dominating the picture? DB tuning is a must, naturally.
Unfortunately I don't know much about IIS tuning other than the "install apache2" kind of fix
That's good one!
Or on a more serious note: http://blogs.zdnet.com/threatchaos/?p=311&tag=nl.e550 (the article is about security, but the two graphs are of interest)
Also beware of the new kid in town http://moodle.org/mod/forum/discuss.php?d=83722#p371729
Finally have a look at http://docs.moodle.org/en/Performance#Operating_System and http://moodle.org/mod/forum/discuss.php?d=54123#p246809