RAM and RAID and concurrent users

RAM and RAID and concurrent users

by J Fernandes -
Number of replies: 3
Hello everyone,
We've a linux moodle server set up by a colleague who has now left, and I'm still learning the system. One issue we have is we sometimes get a 'too many connections' or similiar message when over 30 users try to use moodle.

According to this site, it says 50 users per 1GB of RAM. Our server has 1GB installed with 512MB free.

So if I were to stick in 2 or 4GB RAM in total, would the server just boot up, see and utilise the extra RAM? Would I need to change any settings/config files?

Also, how would I check if the server has RAID configured? DF -H shows 'hda1'.

I also tried to check max connections inside phpmyadmin, but the main page of phpmyadmin is just blank, nothing comes up, not even under 'view source' of the web page.

Please can you help, I appreciate your help.

Thanks for your time,
Jon
Average of ratings: -
In reply to J Fernandes

Re: RAM and RAID and concurrent users

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> we sometimes get a 'too many connections' or similiar message when over 30 users try to use moodle.

What do they do? Just "browsing" or taking an exam using the Quiz module, all at the same time?

> According to this site, it says 50 users per 1GB of RAM.

Depends on the Moodle version, what is yours? Versions of Apache, PHP and MySQL are usefull to know.

> Our server has 1GB installed with 512MB free.

How do you measure?

> So if I were to stick in 2 or 4GB RAM in total, would the server just boot up, see and utilise the extra RAM? Would I need to change any settings/config files?

Upto 4 GB on a 32 bit machine is never a problem. What is your architecture i386? AMD64?

Did you go through the docs? http://docs.moodle.org/en/Performance http://docs.moodle.org/en/Performance_FAQ
In reply to Visvanath Ratnaweera

Re: RAM and RAID and concurrent users

by J Fernandes -
Thanks for your help.

-----What do they do? Just "browsing" or taking an exam using the Quiz module, all at the same time?

They are just browsing and trying to login to Moodle. I've looked in the apache2 log file and found:

[Mon Jul 20 11:04:46 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting

Thing is, we've recently had lots of users on the system just recently with the 'too many connections / database error' but this isn't in the log file...?

-----Depends on the Moodle version, what is yours? Versions of Apache, PHP and MySQL are usefull to know.

Our Moodle is 1.8.2
Apache/2
PHP Version 5.2.6-1+lenny2
MySQL 5.0.51a

-----How do you measure [RAM]?

I type free -m and get:
total used free shared buffers cached
Mem: 1011 857 154 0 25 571
-/+ buffers/cache: 260 751
Swap: 2643 74 2569

-----What is your architecture i386? AMD64?

Intel P4 2.4GHz

Another issue I've found is white blank pages - I recently uploaded random html content and a SCORM package, but some come up as nothing, just white, with nothing when I 'View Source Code' - is this the White-screen-of-death? Any ideas how to fix this?

Thanks again for your help, much appreciated.
Jon
In reply to J Fernandes

Re: RAM and RAID and concurrent users

by Greg Lund-Chaix -
> [Mon Jul 20 11:04:46 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting

That's an Apache configuration issue, not Moodle. Go into your Apache config in /etc/apache2/ and take a look at the MaxClients setting. It's likely too low. Here's a good article on how to calculate what the proper MaxClients setting should be:
http://2bits.com/articles/tuning-the-apache-maxclients-parameter.html

As for the database errors, take a look at your MySQL configs - especially the max_connections variable.

Are you using a PHP opcode cache like eAccelerator or APC? If not, get one installed. That will greatly reduce the amount of time Apache spends processing each request, therefore freeing it up to serve other users.