Optimize Server Performance

Optimize Server Performance

by Edwin Klein -
Number of replies: 7

Good day,

I have a problem here,my moodle server become very very slow (almost hang!) when the concurrent user is around 90. Is there any way to tune and optimize the performance? like mysql? httpd?

my server spec : -

Pentium Xeon, 4GB Ram, 70Gb Hardisk ;

Fedora Core 5, moodle version 1.5.3; 

Thanks in advice. Cheers !

 

Average of ratings: -
In reply to Edwin Klein

Re: Optimize Server Performance

by Randy Obert -

This is about asking what color should I paint my house. There are so many variables involved here in the .conf files that the question is virtually  impossible to answer with the information given.

I would "google" optimize mysql and apache and at least get an idea of numbers that need to fill in the blanks. Also, by default, mysql has caching turned off, turning it on can do wonders (works best on sites with a lot of static data). Reductions on disk reads can reach 75% or more (caching only works on unchanged data fields).

What would be helpful would be some more data on what is going on with the server. Bottleneck fixes are easier when you know what they are.  Look at installing something like  "Munin". This can pinpoint the bottleneck and knowing what to fix is a big time saver.

If this is a production environment, it would probably be to your benefit to use a third party to bring that server up to speed without down time (bad setting's can be disastrous). If you need recommendations for this type of service I can send you links to a couple I have used on my servers in the past.

In reply to Edwin Klein

Re: Optimize Server Performance

by David Scotson -
If you want to optimize then you can reference (and pehaps add to ) the performance info in the wiki: http://docs.moodle.org/en/Performance

It's probably worth investigation to see if there is an actual problem above and beyond overloading since you'll probably need to do some profiling to figure out what the bottleneck is anyway (that is, if you're running out of RAM it would be silly to upgrade your processor or vice versa)
In reply to David Scotson

Re: Optimize Server Performance

by Genner Cerna -
i've tested a simutanneous browsing around 50, ya it does hang.
In reply to Edwin Klein

Re: Optimize Server Performance

by Randy Obert -
with 4gigs of ram I find it most unlikely he is out of memory. However a diagnosis without some monitors running is futile.  You may and probably will eventually find the bottleneck by hunt and peck but it will take more luck than skill. 50 users on a server like that should not even make is stutter much less stall
In reply to Randy Obert

Re: Optimize Server Performance

by Martín Langhoff -
> with 4gigs of ram I find it most unlikely he is out of memory.

With the Apache+PHP memory model it is perfectly possible sad

> However a diagnosis without some monitors running is futile.

Exactly. The sysstat utility is great for this kind of thing, as you set it to run, and then collect 'forensic' data after the fact. Recommended wink
In reply to Martín Langhoff

Re: Optimize Server Performance

by Randy Obert -

<With the Apache+PHP memory model it is perfectly possible traurig>

Are you referring to segmentation?  Sorry i am not familiar with this term in this context.   Anyway, with servers even in shared environments, a single P4 2.4 Ghz w/2G of memory, 50 to 90 concurrent users is do-able. As Moodle seems to be most intensive on the mysql db, is why I was wondering what was going on with the mysql cache file. (a program called "mytop" works rather nicely for this).

It does occur to me that if the swap is perhaps to small, (if the system was even swapping to disk) it could be an issue.

For diagnosis I prefer a graphing program like Munin that tracks virtually every aspect of the boxes activity and plots it in an easy to see format.  Trends are just easier to follow IMO.

In reply to Randy Obert

Re: Optimize Server Performance

by Rory Allford -

Briefly, to prevent Apache bloat, you can try lowering MaxRequestsPerChild and perhaps the PHP memory limit as well (about 16M).

Past discussion on memory consumption tuning.

Perhaps the Performance section in the wiki could be expanded to more than one page's worth seeing as there's so much info located in past forum threads.