How many concurrent users should my hardware support?

How many concurrent users should my hardware support?

by Hassan AbdelSabour -
Number of replies: 10

Ok, So I am quite confused because I am installing moodle in the cloud. I have multiple sizes and flavors of virtual machines. Yet I don't know which one to pick for x concurrent users. 

One thing I tried with a virtual machine with 2 processors( 8 Cores), 14 GB of memory, windows 2008 r2, apache web server, Postgres Database, php 5.6, moodle 2.8 is:

I ran apache ab.exe on my site front page with 1000 requests and concurrency level of 100. My site is http://www.toastech.com.  

The results showed 26 requests were completed per second (mean).  The thing is the environment of the testing is as the following:

1- ab.exe was runned on the same virtual machine that the site was running on (this might not be right I don't know). 

2- Apapche, PHP, Moodle, and postgres are all on the same machine. 

The reason I am asking this question is because I am going to be renting these virtual machines that runs moodle to schools.

So suppose a school comes to me and says the following: We have around 1500 users and expect no more than 300 concurrent users. Now what configuration should I pick? Do I need to use multiple servers? like one web server and one database server? or not? what should be their specs? Can Ab.exe be used to test a moodle deployement performance?

Please try to help. I am very new to all of this. So I easily get confused.

*I downgraded the vm on which my site is running on. at the time this post is writtent it is 1 core and 1.75 GB.

Average of ratings: -
In reply to Hassan AbdelSabour

Re: How many concurrent users should my hardware support?

by Usman Asar -
Picture of Plugin developers Picture of Testers

Hassan,

apart from concurrency of users, there are plenty other factors that play a part in deciding factor for server hardware, starting from O/S (Windows based takes bit more resources), Your web server software, what users will be doing (Quizzes, Forums, Chat) as usually these three are most resource demanding activities on Moodle.

Where you asked, if separate database server is required, although its not, but its always useful as database has most I/O operations running Moodle. As you said you have VM's, then only thing you can do is fire up a separate VM to run a DB server in case of a loaded Moodle, but if you'd access to hardware, then I would have suggested running DB discs on a separate RAID whilst sharing same server resources. For something like 1500 users and 300 concurrent, even 4GB RAM would be enough.

Average of ratings: Useful (1)
In reply to Usman Asar

Re: How many concurrent users should my hardware support?

by Hassan AbdelSabour -

Thanks a lot Osman for your help. From what you say, I understand that the biggest bottle nick lies in the I/O operations, right? Ok, as I said before I am using VMs, some of which have SSD Storage and faster CPUs.

So my questions are:

 1- Is it ok to have one VM for serving as the database VM for multiple Moodle Sites which has a faster cpu and SSD Storage? 

2- What would be that VM Specs in terms of RAM, CPU, On windows & Postgris per say 1000?

3- Also What is RAID?

4- Because I will be renting, I have to tell the school one price that will not change that easily, So I don't mind testing multiple configurations to see which one will suit them more, but how do I do so? Is there is some tool you know of that I can use to test my current Moodle Installtion and come up with a result like ( Under X Configuration, We can support around Y Concurrent users doing so and so)?


In reply to Hassan AbdelSabour

Re: How many concurrent users should my hardware support?

by Usman Asar -
Picture of Plugin developers Picture of Testers

Hello Hassan,

Apologies for delay, as usually replies comes after a day so I thought to check if you need further assistance.

Regards to answer to your queries.

1: Yes its OK to have one powerful Database server to serve for databases for schools, in fact in multiple Moodle hosting environment, I would always recommend keeping Database server independent.

2: for 1000 users (assuming this figure is concurrent & signed in users), Dual Core CPU, 8GB would be enough, as figure of 1000 concurrent doesn't means that each of 1000 users are clicking the same button at the very same instance.

3: RAID stands for Redundant Array of Inexpensive/Independent Discs (some call it inexpensive some call it independent), and there are 4 types of RAID configurations commonly used

RAID-1(Mirroring) : requires 2 discs of same size, and data is replicated to both discs, so disc reading is from both discs making it a speedy option, as data is replicated so essentially disc space  is halfed, for example if you have 2 1TB drives, then space you'll get is 1TB as data is mirrored over to other drive, if in case one drive fails, you are safe as data is still on to other drive.

 

RAID-0 (stripping), in this case, same 2 drives are required, and data is equally distributed over to both drives, so for example if you saved one file of 100K, then 50K will be moved to one drive and other 50K to other drive, this increases the speed of throughput and doubles the space, so if you have 2 1TB drives, the actual space you'll get will be 2TB (2 x 1TB), bad thing about this RAID is, if one drive fails, you lost data as other drive will have half of data. benefit is tremendous read/write speeds

 

RAID-5 (Parity) - required minimum 3 drives, and each drive will have a parity bit, actual drive space you'll get is 2/3rd of drives, so if you have 3 x 1TB drives, actual space you'll get is 2TB, very good reading speeds but poor writing speeds as parity bit has to be equalized over to three drives. if your database has more reads then writes, then you can implement this RAID-5

RAID-10 (actually is RAID-1 and RAID-0) Mirroring and Stripping - I dont have to explain this, as RAID 1 and  RAID 0 are already explained above, so you can expect tremendous speed and data safety as well as Data is stripped and then mirrored, it requires 4 drives minimum (with multiples of 4, so 4, 8, 12, 16 drives etc), it allows 1 drive to fail in array, so essentially with 2 drives failures out of 4 (one in each array) you can safely operate server without loss. RAID10 is recommended where data reads and writes are fast. the drive space you get is 1/2 so for example if you have 4 drives with 1TB capacity each, actual space you'll get will be 2TB.

RAID configurations can be implemented  in 2 ways, SOFTWARE and HARDWARE, with software RAID, it comes as part of Operating System and doesn't require any additional hardware, small issue is, it takes some portions of CPU and RAM, Hardware RAID as name suggests, are setup on a independent RAID card, they have their own CPU and RAM so they leave system resources free.

Where I mentioned setting up RAID in one box, means, you can setup a RAID card with 4 ports, assign 2 ports for RAID-1 for Web server/Application server and Assign 2 ports for RAID-1 to Database separately. if you want to go bit further, then 6 ports RAID card, with RAID-1 assigned to O/S and Swap file, RAID-1 assigned to webserver and moodle files, and RAID-1 to Database.....want to get even further, then RAID-1 for O/S & Swap, RAID-1 for Webserver in SATA 7200RPM discs or even better if SCSi (10K RPM or 15K RPM )discs are used and RAID-4 for Database in SSD (that will require 8-port Raid card and 8 discs in all)

4: You dont have to be fixed in offering VM's to schools, as the benefit of VM is, resource allocation with few clicks, so take estimate and start with offering say for example dual core CPU, 4GB RAM etc and as they start growing (or require more resources), simply allocate them the resources.

In addition, of hardware, I will recommend using LiteSpeed servers as opposed to Apache, though Apache is free but adding a bit to the cost will double your Moodle performance rather than allocating resources, so for example if you have allocated a dual core CPU and 4GB ram to a school, if you need upgrade, rather than allocating another few cores and  additional RAM, just add 1-core CPU license to a dual core CPU, or a 2 core CPU license to a quad core CPU, and see for yourself the performance boost.

regarding testing your moodle installations, there is test moodle instance available inside Moodle (not to be used on Production server), apart there are other options available, Tim Hunt of Open University will be able to assist you in testing Moodle load impacts more as he manages Moodle users in terms of 100,000 or more. or you can always open another thread regarding the Moodle Load Testing.

Average of ratings: Useful (1)
In reply to Usman Asar

Re: How many concurrent users should my hardware support?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Usman is a big fan of LiteSpeed, but do note that it is not fully supported by Moodle (meaning that it should work but weird bugs may not be fixed). Even if it doesn't provide the last word in performance I would stay boring and stick with conventional server configurations. It's a lot easier to provide ongoing support. 

A good disk setup is important. Good disk io performance is *very* important. None of this saves you if the building burns down. Make sure you have a proper backup regime whatever you choose. 

Just my $00.02 wink

Average of ratings: Useful (1)
In reply to Howard Miller

Re: How many concurrent users should my hardware support?

by Hassan AbdelSabour -

Thanks Howard and Usman for your help and support. That is about everything I need. If I ever need any help I will contact you and post here again.

In reply to Hassan AbdelSabour

Re: How many concurrent users should my hardware support?

by Hassan AbdelSabour -

Hello smile,

OK so I am using Azure VMs. Pricing and machine sizes can be found here:

http://azure.microsoft.com/en-us/pricing/details/virtual-machines/ 

I am asking in particular about D1 and D2 VMs. 

If I use the following Configuration on each one, how many concurrent user will I be able to support?

Windows ServerIIS, PHP with Fast CGI & Zend Opcode Caching, Postgressql

Please note that for D1 the single core speed is 2.2, and users will be using all types of things in Moodle like quizzes, Chat, and Forums.

In reply to Hassan AbdelSabour

Re: How many concurrent users should my hardware support?

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 don't know much about Windows. My experience suggests, though, that you work out the hardware requirements for Linux and then double it for Windows and you'll be somewhere near. 

Again, the only sure-fire method is to try it yourself, with your data and your users. 

Average of ratings: Useful (1)
In reply to Hassan AbdelSabour

Re: How many concurrent users should my hardware support?

by Usman Asar -
Picture of Plugin developers Picture of Testers

Hassan, the pricing structure is pretty steep to offer VM's, why dont you try Hybrid servers on Linux? they'll be cheaper and prove to be better in terms of profitability.

Average of ratings: Useful (1)
In reply to Hassan AbdelSabour

Re: How many concurrent users should my hardware support?

by jason everling -

I just wanted to give my input also, I would also recommend a Linux Server.

On Ubuntu Server, 12.04LTS, Moodle uses anywhere from 50mb to 100mb of memory per concurrent process during a quiz, the lower end is just forums posts and other clicking around,

The attached is live reading during a quiz, Moodle, no-addons, secure quiz in popup, 1 question per page, you can see how much memory each concurrent process is using.

Using the highest for today, that would be 10 concurrent processes per GB of memory, this is what I have always seen and in all my posts. 4GB of RAM = about 40 concurrent requests if all 4GB are dedicated to IIS or Apache, the OS would still need additional memory

capture

JASON

Average of ratings: Useful (4)
In reply to jason everling

Re: How many concurrent users should my hardware support?

by Hassan AbdelSabour -
Thanks a lot everybody. especially you Jason.
Osman, true the Windows pricing is steep. However, I will go now with Windows because we are in a hurry to deploy one site. It is already done, you can find it here www.toastech.com.

In the future, if the windows pricing doesn't change or I get discount from Microsoft, then I will learn Linux and start deploying on it.

Thanks again smile.