Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moodle config tuning related to file server (Gluster/NFS) #110

Open
hosungsmsft opened this issue May 16, 2018 · 0 comments
Open

Moodle config tuning related to file server (Gluster/NFS) #110

hosungsmsft opened this issue May 16, 2018 · 0 comments
Labels
enhancement New feature or request Priority 0 (will address) Pull requests welcome, failing that we will get to this ASAP.
Milestone

Comments

@hosungsmsft
Copy link

It was pointed to us by a partner that our installed Moodle config might be improved for optimized performance in relation to the shared file server directory (/moodle on Gluster or NFS). It was also pointed that these are all available in the config-dist.php that's distributed with Moodle. Therefore, we should evaluate whether these are applicable to our architecture and incorporate anything that can improve performance. Here are the partner's verbatim:

First, here are the alternative configurations for getting session data off the gluster:

// Following settings may be used to select session driver, uncomment only one of the handlers.
//   Database session handler (not compatible with MyISAM):
//      $CFG->session_handler_class = '\core\session\database';
//      $CFG->session_database_acquire_lock_timeout = 120;
//   Redis session handler (requires redis server and redis extension):
//      $CFG->session_handler_class = '\core\session\redis';
//      $CFG->session_redis_host = '127.0.0.1';
//      $CFG->session_redis_port = 6379;  // Optional.
//      $CFG->session_redis_database = 0;  // Optional, default is db 0.
//      $CFG->session_redis_auth = ''; // Optional, default is don't set one.
//      $CFG->session_redis_prefix = ''; // Optional, default is don't set one.
//      $CFG->session_redis_acquire_lock_timeout = 120;
//      $CFG->session_redis_lock_expire = 7200;
//      Use the igbinary serializer instead of the php default one. Note that phpredis must be compiled with
//      igbinary support to make the setting to work. Also, if you change the serializer you have to flush the database!
//      $CFG->session_redis_serializer_use_igbinary = false; // Optional, default is PHP builtin serializer.

(Note from @hosungsmsft: We do configure redis as the session handler when redis is chosen, but we are not configuring database as the session handler when redis is not chosen. We should evaluate if database session handler is better when redis is not chosen and make it default in that case)

Next, at the very least the localcachedir should be somewhere fast and local - not on the gluster.
I'm not sure whether you need to set the preventfilelocking flag.

// It is possible to specify different cache and temp directories, use local fast filesystem
// for normal web servers. Server clusters MUST use shared filesystem for cachedir!
//     $CFG->tempdir = '/var/www/moodle/temp';        // Directory MUST BE SHARED by all clsuter nodes.
//     $CFG->cachedir = '/var/www/moodle/cache';      // Directory MUST BE SHARED by all cluster nodes, locking required.
//     $CFG->localcachedir = '/var/local/cache';      // Intended for local node caching.
//
// Some filesystems such as NFS may not support file locking operations.
// Locking resolves race conditions and is strongly recommended for production servers.
//     $CFG->preventfilelocking = false;

(Note from @hosungsmsft: We should evaluate the localcachedir option in general and the preventfilelocking option for our NFS option)

I'm not sure about the impact of this next one but reading the description I would expect to use a local directory and not a gluster directory

// Moodle 2.4 introduced a new cache API.
// The cache API stores a configuration file within the Moodle data directory and
// uses that rather than the database in order to function in a stand-alone manner.
// Using altcacheconfigpath you can change the location where this config file is
// looked for.
// It can either be a directory in which to store the file, or the full path to the
// file if you want to take full control. Either way it must be writable by the
// webserver.
//
//     $CFG->altcacheconfigpath = '/var/www/shared/moodle.cache.config.php

(Note from @hosungsmsft: Not sure if this can be applied to our architecture. Need research)

@hosungsmsft hosungsmsft added enhancement New feature or request Priority 0 (will address) Pull requests welcome, failing that we will get to this ASAP. labels May 16, 2018
@hosungsmsft hosungsmsft added this to the v1.5.3 milestone May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority 0 (will address) Pull requests welcome, failing that we will get to this ASAP.
Projects
None yet
Development

No branches or pull requests

1 participant