Performance problem in deploying Moodle using LAN based server

Performance problem in deploying Moodle using LAN based server

by Mehwish Leghari -
Number of replies: 7

Hi All

We are a University we have deployed Moodle on our web server successfully years back. Now we want to conduct online examination (with about 100 users at a time) using Moodle. We conducted testing exams with 23 users using our live web server (means using Internet) [linux Red Hat on dual processor with 2GB RAM ] and all went well. But when we setup a separate server it hangs on the day of examination with 70 users [it was Red Hat on Intel Dual Core System with 1 GB RAM]. Now after failure we are doing load testing (through a software) on live server it can face 100 users but LAN based server cannot (even with 4GB RAM). I want to ask what could be the reason? What is difference between Internet and LAN (in terms of traffic)? Shall we conduct exam on Internet server?

Regards.

Mehwish Leghari.

Average of ratings: -
In reply to Mehwish Leghari

Re: Performance problem in deploying Moodle using LAN based server

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'm not sure I understand what you mean by a "LAN based server".

Load testing is notoriously unreliable as a guage of "real world" usage. You may find that under the same conditions your original server would have fallen over. My gut feeling is that your server specs are optimistic for this level of concurrent testing.
In reply to Howard Miller

Re: Performance problem in deploying Moodle using LAN based server

by Mehwish Leghari -

By LAN based server I mean our local server that is not available through Internet. Actually for security reasens we are willing to conduct online exams on local server not on Internet.

In reply to Mehwish Leghari

Re: Performance problem in deploying Moodle using LAN based server

by Taliesin Nuin -
The difference between your Internet server and your LAN server (in terms of traffic) is probably *not* what has caused it to fail. I say this because the amount of traffic from 100 users submitting quizzes will be small whether it is to a local server (your LAN) or to a remote server (over the Internet).

The difference is more likely to be due to the RAM or the number of users.

RAM is like weights on a balance. You have the amount of RAM on one scale, and your software needs on the other. So long as the RAM > needs, everything is fine. But the moment needs > RAM, it doesn't just slow down, it tips entirely. If one machine has 2GB RAM and the other has 1GB, then this is significant.

The biggest issue will be your number of users. If it works with 23 users, that doesn't mean it will work with 100 users four times as slowly. It may fail entirely. Moodle scales badly when lots of people submit quizzes at the same time.

You say that you are doing load testing with software. How are you doing this / what software?

The problem is likely to be 100 people all pressing "Submit" at the same time. If you can stagger this, i.e. 10 people submit, followed by 10 people, followed by 10 people... etc. then this will probably make a big difference.

EDIT: However, you say that your Internet server can handle load which your local server cannot even with increased RAM). If you're sure your test is accurate, then the difference is likely to be in the configuration of Apache or MySQL on the (local) LAN server. Check the configuration files for these processes and look for any problems. E.g. very little cache for MySQL. See http://docs.moodle.org/en/Performance for guidance.
Average of ratings: Useful (1)
In reply to Taliesin Nuin

Re: Performance problem in deploying Moodle using LAN based server

by Mehwish Leghari -

Thanks for reply. One of the problems was certainly the RAM. But now we have overcome that with 4GB RAM. We are even considering more RAM. I analyzed php.ini and my.conf and got some differences as well. We are using trial version of a software WAPT (Web Application Testing) for 80 and more virtual users and will conduct the real testing soon. If we separate servers (machines) for Apache and MySQL will it make performance even better? What php accelerator shall we use? We have never used php accelerator yet. Actually this time we do not want to make any mistake, we do not want to leave any thing that affects performance of the server during exams.

Regards.

Mehwish Leghari.

In reply to Mehwish Leghari

Re: Performance problem in deploying Moodle using LAN based server

by Cesar Sanchez -

Hi,

If I understand Well, By a Lan server you mean a server that has a local tcp/ip network without having access to Internet. Maybe your problem is not just moodle setup, but the configuration of the webserver for moodle. If you are using apache server, note that some default configurations need DNS access to the internet for proper operation. Also there's another configuration issues on the OS that need to be properly tuned on a server that not have access to the internet. If moodle receives a lot of user requests on the webserver that is misconfigured could have a lot of load of Waiting Threads.

Also, if your lan is isolated, You are on a VLAN? or just a physical LAN?. Have another TCP protocols locally running on it.

I hope this helps you.

Cesar.

Average of ratings: Useful (1)
In reply to Cesar Sanchez

Re: Performance problem in deploying Moodle using LAN based server

by Mehwish Leghari -

Thanks Cesar. Can you tell me exactly where to check server configurations and for what values? I have checked php.ini for mysql.max_links, session.cache_expire etc. Where else and for what values shall I check for? We are on the Physical LAN.

In reply to Mehwish Leghari

Re: Performance problem in deploying Moodle using LAN based server

by Cesar Sanchez -

Hi!.

For checking if your problem is the configuration of the local network, I Would Start checking the httpd.conf in apache webserver.  Checking if the parameters of DNS are correctly set.  Asuming you are using an IPV4 network, and not using DNS, you have to configure your webserver to not to resolve names Directive 'CanonicalName' for example in the apache config files.

You have to tune all the netwok parameters for the local network, and not to route to the Internet. In Linux servers  in the network-scripts under etc you have all the parameters you have to setup.

Also check your resolv.conf file and point it to resolv first your hosts file and will easy your setup.

You can setup a local DNS server with bind  and edit zones in your isolated LAN, but it's some work to do and beyond the topic.

Finally i think you could setup yor examination system on a network conected to the internet, and isolate completely the acces of your clients by doing restrictive setup to your apache webserver, seting a ssl certificate, and configuring the security properties of the same moodle tools, and could be much easier.. And is totally safe.

regards.

Average of ratings: Useful (1)