Hardware and performance

 
 
My picture
Hardware requirements for a Moodle-medium size in CenTOS
Group Particularly helpful Moodlers

Dear Moodlers,

I am an education technologist and it is the first time that I have set up a Moodle site from scrath in a virtual machine hosted by our university.

Originally we hired 4 GB RAM memory and 20 GB hard disk, from which 6 GB are already utilised by the OS (CenTOs).

In that VM, we want to have two Moodle sites:

-One Moodle site of small size (around 100 users for the first year).

-Another Moodle site which is a mirror of our main production site:

Moodle core (2.2): 110 MB (including additional plug-ins, etc).

Moodedata folder: 5.6GB

Database: around 60.00 KB

I read the Moodle documentation regarding the hardware requirements, but I think it has become a bit obsolete:

http://docs.moodle.org/24/en/Installing_Moodle

Our production site is hosted by our education partner and they have been really generous regarding the hardware:

8 GB RAM memory.

A C drive for the OS of 100 GB or so.

A E drive for Moodle (folders moodle and moodledate) of 200 GB.

_We don't pay for any of them.

_____________________________________________________________

I have noticed that, with the current hardware requirements that we have hired for the CenTOs-VM hosted, the performance of the mirror production site is pretty slow:

Using performanceinfo on, the average loading time as an admin is:

20 seconds or so:

 

23.303498 secs
RAM: 40.2MB
RAM peak: 40.9MB
Included 1081 files Contexts for which filters were loaded: 64 Filters created: 192 Pieces of content filtered: 69 Strings filtered: 0 get_string calls: 2333 strings mem cache hits: 2526 strings disk cache hits: 211
DB reads/writes: 1247/2
Load average: 0.00 Session: 6.8KB

RAM used an peak RAM are not very high, as you can read.

Since I have followed all the instructions in Moodle.org to optimise the MySQL database and the server, I believe that the mirror site is too slow because the partition in which we have  Moodle is too small (not even 15 GB):

]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-root
4128448 2734708 1184028 70% /
tmpfs 1962500 0 1962500 0% /dev/shm
/dev/sda1 253871 37439 203325 16% /boot
/dev/mapper/VolGroup00-www_data
10321208 430536 9366384 5% /var/www

Could please advice me of how much RAM memory and storage space should I hire in order to have our medium site Moodle running smoothly?

Since we will be paying for it, I have to be cautious 

 

Thank you very much for your advice

 
Average of ratings: -
Picture of Howard Miller
Re: Hardware requirements for a Moodle-medium size in CenTOS
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

You don't say if a 23 second load time is average or exceptional but if most pages are running at that speed then your site would appear to be either broken or heavily overloaded. 

The advice on the installation page is up to date and is a reasonably starting point. However, only you know how your site is used and what actual load that causes on the server.

The disk space is really not relevant for performance (although the disk subsystem performance is). You also need to tune the server for running Moodle as (for example) Apache is usually configured for serving small web pages and MySQL uses memory very conservatively. 

4GB is usually a good start for a small server although more is common. A 20GB hard drive seems a bit 1990s to me wink (the last server I bought was 32GB Ram and 33TB of disk space). 

 
Average of ratings:Useful (1)
My picture
Re: Hardware requirements for a Moodle-medium size in CenTOS
Group Particularly helpful Moodlers

Thanks, Howard. I also thought that 20 GB was too short. It was the initial storage space suggested by the Head of IT when we signed the hosting service.

Can you please explain in more detail how to optimise 'Apache'?

I have increased the memory limit for the php.ini and I also followed the indications about MySQL installed in CentOS which appear in Moodle.org.

Thank you very much for your help.

 
Average of ratings: -
Picture of Andrew Nicols
Re: Hardware requirements for a Moodle-medium size in CenTOS
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

Hi Aaricia,

I'll try and run through things in the order you've listed them.

As an aside, 6GB for a base installation of Linux sounds very high. Looking at one of our web servers, the entire Linux installation fits into 2.2GB and we have 1.4GB of log data (we keep logs for a full year).

8GB RAM sounds plenty. We give our web servers 3GB RAM and 1GB swap. They actively use about 1GB through various processes (e.g. Apache) and the rest of the system memory is typically in cache. At present we're going out of term time and have recently rebooted them all so we actualyl have a few 100MB of unused RAM.

Generally, if you're looking at slow speeds on a new install, you're missing any form of PHP accelerator. The most commonly used acclerator is APC. Can you confirm that you have this installed, and that you've tuned it appropriately? We give our APC cache a little over 400MB of memory for caching.

Your disk usage is not going to affect your performance, but disk speed may.

I'd also suggest you invest some time in monitoring of your VM. We make use of munin for our graphing.

Before you decide that any one thing is the problem and start tuning that area, you must be aware of the whole picture and where your resources are actually used and where they're actually tight. There is no point in guessing.

Andrew

 
Average of ratings: -
My picture
Re: Hardware requirements for a Moodle-medium size in CenTOS
Group Particularly helpful Moodlers

Thank, Andrew, the problem is that not all the 20 GB are assigned to the partition in which the var/www directory of CenTOs is.

It looks that the IT department hosting the VM is using two partitions (for the information displayed when I type df) . This is something I already asked them.

I will keep the 4GB RAM memory them, but I need to increase the storage space for the var/www directory.

How much disk space are you using in your case?

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Hardware requirements for a Moodle-medium size in CenTOS
Group Particularly helpful Moodlers
Hi Aarcia

You wrote:
> It looks that the IT department hosting the VM is using two partitions (for the information displayed when I type df) .

From your original post:
===
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-root
4128448 2734708 1184028 70% /
tmpfs 1962500 0 1962500 0% /dev/shm
/dev/sda1 253871 37439 203325 16% /boot
/dev/mapper/VolGroup00-www_data
1032208 430536 9366384 5% /var/www
===
Your HD has one primary partion, sda1, mounted as /boot. It roughly 250 MB big and 16% full.

The remaining space is devided into two LVM partitions:
- the / partition, /dev/mapper/VolGroup00-root, is roughly 4 GB and 70% full.
- a /var/ww partition, /dev/mapper/VolGroup00-www_data, is roughly 1 GB and only 5% full.

In the OP you also said:
> from which 6 GB are already utilised by the OS (CenTOs).
Where did you get that figure? The 'df' above shows 70% of 4 GB = 2.8 GB.

I wouldn't know how to deduce the disk space needed by one person by looking at a random installation. If you can handle that, here are some details of Andrew's setup: https://moodle.org/mod/forum/discuss.php?d=221461#p966368.
 
Average of ratings: -
My picture
Re: Hardware requirements for a Moodle-medium size in CenTOS
Group Particularly helpful Moodlers

Thank you very much for clarifying the meaning of the information displayed by df.

I take note of it for my next meeting with IT

 
Average of ratings: -