Planning new server hardware; and deciding between WAMP & LAMP

Planning new server hardware; and deciding between WAMP & LAMP

by Bob Majors -
Number of replies: 17
We seem to have hardware specs that are more than adequate for our user situation (load), but have run into some problems (CPU spikes, occasional PHP fatal errors) and are seeking advice on future hardware, etc. Sorry for the long post, but I wanted to include as much detail as might be necessary for useful feedback.

Bob

GIVEN:

- Moodle service with a count of approximately 1,500 current users, with a projection of up to about 2,000 max over the next three years.

- Windows Server 2003 Enterprise . (No known security breaches in the three years of production.)

- Current hardware: Dual Intel Xeon - 2.4GHz - 512KB Cache. 12GB RAM. 1Gb ethernet. Two drives mirrored for the boot drive (operating system and applications). Two 200 GB drives (Seagate 200GB 7200.7 (7.2Krpm-8MB Cache) SATA) mirrored (RAID 1).

- The majority of media is streamed from another non-Moodle server. There are some relatively small mp3 audio files, and medium to small-sized graphics files hosted for use with Moodle.

- The existing server is seeing CPU spikes of 100%. During backups we can reasonable assume this is the Apache doing the MySQL calls -- a lot of data being backed up. During normal use, it is unclear if the Apache making PHP calls is the culprit, or the retrieval of information from MySQL. One might not think that the Apache would be that much data, but one of the two main courses (one of two installations, which has up to 30-50 courses in it) loads dozens of images and text. 30-40 students hitting that same page could definitely slow down the system. Not to mention the other Moodle installation (on the same box).

- We may have 30-50 concurrent users; we have have double that in the future we are trying to plan hardware for.

- With a significantly smaller user base, running Moodle 1.5.3 and PHP 4.x, we had a fairly smooth initial year of service.

- After upgrading to Moodle 1.6 and PHP 5.x, we had show-stopping IIS stoppages; subsequently corrected after switching to Apache.

- Currently at Moodle 1.7, and had a handful of Apache service stoppages (PHP Fatal errors) for 3 months.

THEN:

- We have looked at http://docs.moodle.org/en/Installing_Moodle#Requirements , and our specs seem do not seem to indicate that we are underpowered.

1) How do these specs look for our needs over the next three years?:

Rackform iServ R266
Details:
CPU: 2 x Intel Xeon E5405 Quad-Core 2.00GHz, 12MB Cache, 1333MHz FSB, 45nm Hi-k
RAM: 8GB (4 x 2GB) 667MHz Fully Buffered DIMM - Interleaved
NIC: Dual Intel 82563EB 10/100/1000 Mbps NICs (w/ I/OAT) - Integrated
Management: None
LP PCIe x8 - 1: 3Ware 9650SE-8LPML PCIe x4 8-Port SATA II MultiLane RAID Controller w/256MB Cache & BBU
Low-Profile PCIe x4: None
LP PCI-X 133MHz - 1: None
LP PCI-X 100MHz: None
Integrated SATA: 6 x SATA Ports via Intel ESB2 SATA Controller
NOTE: Drive Count Greater than 6 Requires an Additional SATA Controller
Hot-Swap Drive - 1: 750GB Seagate Barracuda ES (3Gb/s, 7.2Krpm, 16MB Cache, NCQ) SATA
Hot-Swap Drive - 2: 750GB Seagate Barracuda ES (3Gb/s, 7.2Krpm, 16MB Cache, NCQ) SATA
Hot-Swap Drive - 3: 750GB Seagate Barracuda ES (3Gb/s, 7.2Krpm, 16MB Cache, NCQ) SATA
Hot-Swap Drive - 4: 750GB Seagate Barracuda ES (3Gb/s, 7.2Krpm, 16MB Cache, NCQ) SATA
Hot-Swap Drive - 5: 750GB Seagate Barracuda ES (3Gb/s, 7.2Krpm, 16MB Cache, NCQ) SATA
Fixed Drive: None
Fixed / Floppy Drive: 1.44MB Low-Profile Floppy Drive
Optical Drive: Low-Profile DVD-ROM Drive
Power Supply: Redundant 700W - PFC - Auto Switching 100-240V PSU
Rail Kit: Sliding Rail Kit
OS: None
Warranty: Standard 3 Year - Return to Depot - Advanced Component Exchange
Notes: RAID: 3TB HW RAID5 w/ 80GB Carved for OS

**** Additional Non-Standard Components ****
Firewire Card: Belkin PCIe Firewire 2x external 1x internal

Configured Power: 350 W, 359 VA, 1194 BTU/h, 3.3 Amps (110V), 1.7 Amps (208V)

2) Should the load be split out to two CPUs, one for running MySQL only?

3) Is there evidence amongst the Moodle community to suggest that, given equal hardware specs, Linux is likely to be a better OS for us in terms of support / performance / reliability / security for running Moodle? The primary server admin is experienced in Windows; the backup server admin has experience with Windows and OS X. Both have only completed a beginning course in Linux, but are hoping to continue their Linux education (formal and hands-on).
Average of ratings: -
In reply to Bob Majors

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Ralph Patterson -

"3) Is there evidence amongst the Moodle community to suggest that, given equal hardware specs, Linux is likely to be a better OS for us in terms of support / performance / reliability / security for running Moodle? The primary server admin is experienced in Windows; the backup server admin has experience with Windows and OS X. Both have only completed a beginning course in Linux, but are hoping to continue their Linux education (formal and hands-on)."



I've managed Windows networks since NT (Novell prior to that with Windows boxes), and have to say Linux is by far the more intuitive. Setting up Moodle and a LAMP server using Edubuntu was the easiest ever. So easy in fact that I fail to understand why anyone would even bother to use Windows (with either ISS or Apache - and I prefer Apache on a Windows box to ISS, despite all the perl errors that pop up during the install). You'll probably hear equally well from other distributions of Linux; I've toyed with Redhat and Suse with good results, but Edubuntu was just too slick, the latest distribution being pre-packed with Moodle 1.8.3 I believe. My latest box was up and running in less than an hour (including the Linux install ... and naturally I had to have some tunes playing so I could whistle while I worked using Automatix) with Moodle configured in another 30 minutes or less. It really is that simple.
In reply to Bob Majors

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> .. our specs seem do not seem to indicate that we are underpowered.
>
> Rackform iServ R266
> CPU: 2 x Intel Xeon E5405 Quad-Core 2.00GHz, 12MB Cache, 1333MHz FSB, 45nm Hi-k
> RAM: 8GB (4 x 2GB) 667MHz Fully Buffered DIMM - Interleaved
NIC: Dual Intel 82563EB 10/100/1000 Mbps NICs (w/ I/OAT) ...

What an understatement! That is heavy artillery for your 50 current 100 future, concurrent users!

If your software "spikes" it something is very wrong.

> Is there evidence amongst the Moodle community to suggest that, given equal hardware specs, Linux is likely to be a better OS for us in terms of support / performance / reliability / security for running Moodle?

One can't speak of "scientific evidence", but definitely the general openion here is that Linux to be the better OS in at least the first three of your criteria.

There are many discussions in this forum on this subject. Do a search and go through them first. In a day of two, I'll post a couple of links too.

> Both [administrators] have only completed a beginning course in Linux, but are hoping to continue their Linux education (formal and hands-on).

That is an investment you will never regret.

BTW, this is a "members only" forum. It is nice and useful if people use their real names.
In reply to Visvanath Ratnaweera

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Bob Majors -
The Rackform Iserv I listed is proposed; the earlier specs are what we're using now, and having spikes with. I'm guessing that even what we're running now *should* work fine with the number of users, but the there are all the variables: size of pages, specific configs, etc., etc. We've posted about our configs, read posts with similar problems, made numerous config tweaks, but still are not sure why we have the peaks.

Everyone, this is very useful info, thanks.

Bob Majors
Language Learning Center
University of Washington
In reply to Bob Majors

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

This is the link I've promised above: http://moodle.org/mod/forum/discuss.php?d=52498 (check the second posting with further links).

The general answer to your original question is, use the plattform where you have expertise (see posting by Howard 15.1.).

Since you mentioned that you've put two junior admins on Linux training: The nice thing about Moodle and the LAMP/WAMP-stack is that, the Linux team can easily take snapshots of the production (WAMP) server and test them on LAMP. Once they are confident and convinced, dump the W!
In reply to Bob Majors

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Mitja Podreka -
Picture of Translators
1. Hardware is more than enough for the expected user base. I'm running Moodle with 4000 users on Intel Xeon 3.20GHz with 2GB of memory and 200+ courses. I'm experiencing average CPU load of 16% with spikes only at backup time.

2. You can do it but not out of necessity. Just for the fun of doing it.

3. Evidence is that majority of web servers in the world are Linux/Unix machines and LAMP is the most "natural" software combination, since all of them is Open Source and designed to work together. I'm using Debian because it is the simplest and most stable server distribution. Edubuntu should be also OK since it is based on Debian smile

For the 30-50 concurrent users accessing the same course try to use PHP accelerator which will ease the load on MySQL and PHP.
Also with your existent software you shouldn't experience any problems since you have enough CPU power with a big amount of RAM.
IMHO your biggest problem is Windows.

In reply to Bob Majors

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Ryan Smith -
For what its worth, I run our live server and development servers using WAMP (2k3, Apache, MySQL, PHP, and eAccelerator). Our Moodle installation currently serves over 10,000 users, with a max of around 150 concurrent users at a time.

I never quite understood all of the negative attitude towards Windows and the AMP open source programs. Using all of the latest versions of each, I never experience any instability, crashing, or problems. We average nearly 24/7 uptime.

We're currently running the latest CVS version of 1.8 stable, and expect to upgrade to 1.9 as soon as it is released.

Feel free to contact me if you have any questions about the Windows platform.



In reply to Ryan Smith

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Mark Hilliard -
Ryan,
We also had an experienced team seriously test Moodle on WAMP (Windows 2003 sp2, Apache 2.x.x, MySQL 5.x and PHP 5.x.x) in many (about 12 different configurations) and had very frustrating results being constantly plagued with the memory leak/non-release of RAM issue between PHP and Apache.

I am convinced the "devil (and all the value) is in the details" of the WAMP setups that people use!

Can you share exactly what versions of MySQL, Apache 2.?.? and PHP 5.?.? you are using successfully?

From numerous posts here it looks like PHP 5.2.1 is the most stable, but only with specific versions of Apache.

If you can share your "recipe" others might benefit!!
Mark
MPls, MN
In reply to Mark Hilliard

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Ryan Smith -
Sure thing. Here's my setup:

Apache 2.2.6 (2.2.8 is available, current testing it on my dev box)
PHP 5.2.5
MySQL 5.0.45
eAccelerator 0.9.5.2

We've had a fairly busy traffic day so far today. MySQL is sitting at 284MB RAM used and Apache is at 240MB with 40 users online right now. My current server uptime is at 6 days, 11 hours (last week was patch tuesday, so I had to reboot for a couple critical updates). Usually my only downtime comes during patch tuesday each month.

Some helpful links for WAMP users:

http://www.apachelounge.com/ - Steffen the site admin builds the current versions for Windows.

http://www.sitebuddy.com/PHP/Accelerators/eAccelerator_windows_binaries_builds - Chris, the site admin builds the current versions of eAccelerator for Windows.

I hope this helps!
In reply to Ryan Smith

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Mark Hilliard -
Ryan,
Thanks so much for you detailed reply!! It is really helpful to know the versions. I'm convinced they are critical. Your server's RAM specs are good. Our installation(s) of PHP/Apache on W2K3 would eat RAM up to 800 or 900 MB then become non-responsive. We tweaked Apache settings of all kinds to minimize thread/ram use too and nothing helped us solve the RAM issue last year.

I know a lot of folks at the ApacheLounge website well (grin) we spent a LOT of time there, and many were having the same RAM leak issue we were, (Most would auto reboot Apache as a silent fix during day/night.)

We still have a goal to make Moodle fast and STABLE on Windows so I will try your settings and software versions.

Thanks again for sharing, and hopefully it will help many find success as you did!

Mark
Mpls, MN
In reply to Ryan Smith

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Sumit Batra -

Hi All!

Your details are sure sure HELP

I am to decide on a configuration for WAMP for a  Corporate (Pls suggest)

1. 700 Users - Year 1, 1500 - Year 2 ; 5000 upto Year 5

2. Concurrent users (Peaktime) - 300

3. Features: Approx 100 lesson (SCORM) @ Max: 1MB, Forums, Wikis, Chat, Video Conference (No recording/logs), survey, glossary, grade book etc, File repository for Trainers (Approx: 20GB) material can be downloaded by learners

4. (LAST BUT TRICKY for me mixed)

The requirement is that the Employees (Approx: 60% of Users) could be alowed a direct access from the selected server maintained internaly , but other 3rd party users (balance40%) though they would attend same courses - will have to be maintained /served seperately.

(pls suggest , a way to go forward and a possibility that the material/lessons could be maintained at a single place)

Rgds

SB

In reply to Bob Majors

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
I can really only share my own experience and sentiments. With using identical hardware, I felt more comfortable with LAMP over WIMP or WAMP. I used Ubuntu and followed the howtoforge site's perfect server setup.With the Ubuntu install, I did a workstation install so that I could have the GUI on the server. It took a little longer than an hour but I was able to get everything up and running during a day. Contrary to good judgment, I did this the day before I was scheduled to leave for vacation. That said, I was able to fully enjoy my vacation knowing that it was on Linux which I found to be more stable and better performing. Part of the improvement - which was about 10 fold had to do with installing APC to cache the pages but I think some of it is just better managing the various connections. I found that the server bogged down with multiple users under Windows although that was using IIS and I've heard that Apache really makes the difference. So my preference was obviously for Windows. I've installed some Webalizer and Munin to help monitor the site and I feel more in control of the server than I did with Windows. Peace - Anthony

p.s. - I have found support easier and better for LAMP too simply because there were more folks using it or I could find the answers online easily. That said, I never had a problem under Windows that I could not find the answer to or that someone didn't respond to. I just felt that there were more folks with Linux servers than Windows. I'm not sure how that breaks down today.
In reply to Anthony Borrow

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Ralph Patterson -
I concur with Anthony. I've run Moodle on both, but LAMP is more intuitive and straight forward (especially if your familiar with command line usage, which isn't necessary depending upon the GUI you elect to use). I've set up 4 machines using LAMP and Edubuntu now and each gets easier and faster. The server I'm currently using I botched the install of Edubuntu up by not reading up enough on a non supported, non related program and had to re-do the install. Total install time was less than 1.5 hours start to finish, Edubuntu, LAMP, and Moodle.

My only hang up with either has been in upgrading Moodle ... but that is my problem not necessarily an issue with Moodle or the OS themselves. As a result I've learned to beta test more extensively before going to a production machine.

Which ever you decide, there's plenty of support.

Ralph.
In reply to Bob Majors

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You should, of course, consider which operating system you can support. Server administration is rarely trivial and if you are completely new to Linux this could be a stumbling block.

Having said that, all else being equal, Linux should be the default choice. There is certainly large amounts of anecdotal evidence that you are much less likely to suffer performance woes than with Windows. It should be a whole lot easier to set up too.
In reply to Bob Majors

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Matt Halvorson -

I was wondering if anyone could help me plan for what I need in server hardware. I have 200 students and 20 teachers. At the school there are 72 computers. I am not sure how many would be on at the same time at home but I don’t think that all 220 users would be on at the same time. I am planning on using Linux with LAMP. I am currently testing Moodle on Ubuntu Server with LAMP and it works great but the computer I am testing it on is an old desktop that I know will not support the amount of users I need. I need help deciding on CPU and RAM. I saw that number of users should = 50 * GB of RAM but as I said before I don't know how many users will be on at the same time. Does anyone know about the % of your users that are on at the same time so I can estimate?

In reply to Matt Halvorson

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Myles Carrick -
hi Matt,

Moodle will fly on commodity hardware for loads that small.

In school environments that size, the trick is to understand the patterns of usage - particularly in regard to concurrent activities, like quizzes. E.g. - will all students in a grade access a quiz at the same time? How many students is that? How many other students and teachers are likely to be accessing the system during those peak times? In schools the basic numbers are often small, but it's not unheard-of for the peak loads to be relatively high (at least in comparison to many distance ed. setups).

With 200 students I can't imagine you'd ever have more than 15-20 concurrent users and clearly your hardware setup is not going to allow more than 72! With RAM as cheap as it is now, there's no reason to under-spec if it's a dedicated machine... You'll be fine with a modern dual core cpu and 2-4GB.
The issue I often see with smaller, K12 environments is a failure to include redundant elements (RAID setups for disks, redundant power supplies, etc). Remember that even in a smaller environment like this, teachers and students will rapidly come to expect high availability and disaster recovery.

All the best for your install,

Myles C.
In reply to Matt Halvorson

Re: Planning new server hardware; and deciding between WAMP & LAMP

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> I saw that number of users should = 50 * GB of RAM

Probably you mean http://docs.moodle.org/en/Installing_Moodle#How_many_users.3F

But also check this http://docs.moodle.org/en/Installing_Moodle#Requirements
"memory_limit should be at least 16M (32M is recommended for Moodle 1.7 and 40M for Moodle 1.8 or later). Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory."