This is exciting as I am back, NFS question

This is exciting as I am back, NFS question

by Albert Ramsbottom -
Number of replies: 8

Can Moodle access and read/write to Moodle data folder on NFS from 2 or more Apache Web-servers, without any issues?

My thoughts which are a little out of date, are that there is likely to be issues as NFS is not a clustered file system!. I am about to set up a 6 Apache node cluster with 2 x LB and Active/Passive MySQL and heartbeat

My memory is getting dim in my old age smile

Cheers

Albert

Average of ratings: -
In reply to Albert Ramsbottom

Re: This is exciting as I am back, NFS question

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Albert,
why not, especially using NFSv4 and some tuning at least on the mount point: https://moodle.org/mod/forum/discuss.php?d=367790#p1483926 .

HTH,
Matteo

Average of ratings: Useful (1)
In reply to Matteo Scaramuccia

Re: This is exciting as I am back, NFS question

by Albert Ramsbottom -

Excellent I will have a look at the link.

Now what about the application as I have noticed on this system that I am taking over that the application is also shared on the NFS mount

I do not think that this is a good idea as the application should be as close to the web server as possible and I should just rsync the application across the 6 nodes periodically


Cheers

In reply to Albert Ramsbottom

Re: This is exciting as I am back, NFS question

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

Make sure you set up a "proper" cache (e.g. Redis). NFS is rarely fast enough to provide decent performance for your cache (caching to 'moodledata' being the default)

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

Re: This is exciting as I am back, NFS question

by Albert Ramsbottom -

We have four Memcached servers at the moment

But I am still wondering why we would have the application on an NFS share? I understand the moodledata folder but I would have thought that the application residing on the NFS share will slow it down considerably


Cheers

In reply to Albert Ramsbottom

Re: This is exciting as I am back, NFS question

by Chris Fryer -

But I am still wondering why we would have the application on an NFS share

My instinct would be to have wwwroot on local disk, but it doesn't much matter, I suppose, as long as you have opcache running. As soon as a PHP script is requested, it will be compiled and locked in memory on the web server. If you've set opcache.revalidate_freq to a suitably high number, Apache/PHP won't need to read from the NFS directory very often.

Of course there are other files, such as CSS and JavaScript, that are also served from wwwroot so you will want to ensure Apache is caching those locally.

https://httpd.apache.org/docs/2.4/mod/mod_file_cache.html

Average of ratings: Useful (1)
In reply to Albert Ramsbottom

Re: This is exciting as I am back, NFS question

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 obviously misread this. The application files. 

I'm not sure it hurts. NFS speed is always my big worry. For example, https://aimeos.org/tips/modern-php-applications-up-to-110x-slower-on-network-storage/

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

Re: This is exciting as I am back, NFS question

by Albert Ramsbottom -

Exactly, I have never seen multi-node moodle application files stored on an NFS drive

I have always had the moodle application local to the web nodes and ran rsync to make sure they remain the same if I add or update something


Cheers

In reply to Albert Ramsbottom

Re: This is exciting as I am back, NFS question

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Albert,
me too Yes: webapp locally stored, kept aligned via OS-dependent solution (rsync vs DFSR) or via versioning (git hooks).

HTH,
Matteo

Average of ratings: Useful (1)