Forums | Mahara Community

Developers /
Clustering - NFS - memcache


20 November 2014, 9:12

Hi,

I'm currently building our production environnement at the Unviersity of Montréal. We are planning to have 2 web servers behind a load balancer. I got my NFS storage and I try it and see that the performance was not there (with only 1 user, we are not talking about load testing). After some research on google I found one forum post that suggest to put the session file on local storage :

forum.ovh.com/showthread.php?78027-Mahara-ne-fonctionne-plus-en-offre-mutualis%E9-OVH

Work fine for me. On a short term this will be our config.

I also find this issue on launchpad that confirm the problem with NFS.

bugs.launchpad.net/mahara/+bug/785469

Memcache will be our final solution.

My question : Why is it so slow with NFS ?

21 November 2014, 9:50

I also notice that the version 1.10 got a new parameter for the NFS problem.

$cfg->sessionpath

Aaron Wells's profile picture
Posts: 896

26 November 2014, 13:08

We actually added the $cfg->sessionpath option in 1.9. :)

https://bugs.launchpad.net/mahara/+bug/1250256

Aaron Wells's profile picture
Posts: 896

26 November 2014, 13:07

Hi Steve,

It's an NFS issue rather than a Mahara issue. Other PHP applications have the same performance problems when you store session files on NFS. For instance, you can find some information about it on the Moodle forums as well: https://moodle.org/mod/forum/discuss.php?d=156698

In addition to the performance problems, NFS apparently doesn't handle locking correctly for PHP session files, which can cause them to become corrupted.

So in a cluster, the current alternatives to NFS are:

A. Use memcache

B. OR store the files in a local directory of the web server, and use "sticky sessions" to make sure a visitor always gets sent to the same web server.

Cheers,

Aaron

Ruslan Kabalin's profile picture
Posts: 146

27 November 2014, 23:58

+1 to what Aaron said.

NFS is slower than local drive by its nature, it is network drive after all, which is almost always slower than the local disk. Be careful with memcached, loadtest it in your environment, there are are cases when memcache becomes a bottleneck in system performance.

02 December 2014, 7:48

Thanks guys for your answers. We will load test with local session files and load test with memcache after that. We will be able to compare the results.

6 results