Moodledata Directory

Moodledata Directory

by R.T. Brown -
Number of replies: 2

Hi folks,

I've read many posts, and used the advanced search, but I'm still not clear on this topic. If it is detailed / outlined somewhere my apologies for the post and please simply respond with a link.

NOTE: This is not a question about best practices...I'm not looking for recommendations...think of this as an exercise of what's technically possible. I would like detailed information about the topic described below. Or, some recommendations how I can understand what's described below.

I've read many forum posts that advocate NOT separating the moodledata directory from Moodle's core installation for a variety of performance reasons. All of these discussion points may be completely valid and relevant…but that is not really a concern of mine at the moment. I simply want to understand when the various components of the moodledata directory are engaged, (cache, filedir, lang, repository, temp, trashdir), and which are potentially good candidates (technically) for symbolic linking or using some other system admin-esque / system architecture technique. For example, could all directories save for "filedir" and "repository" remain local to the installation, but "filedir" and "repository" be symbolically linked to a shared storage device?

Any insights or guidance is greatly appreciated.

Sincerely,

 

R.T. Brown

Average of ratings: -
In reply to R.T. Brown

Re: Moodledata Directory

by Troy Shimkus -

That's something I would be interested in as well. I've looked at using symlinks in other areas of server administration, but not moodle yet necessarily. Ignoring the potential performance issues, finding out the use of the directories in a system would be good. 

I'll give some info on the system I manage:

40,000 users, routinely several hundred online at the same time

Folders in the moodledata dir:

filedir: 64GB

cache: 3k

trash: 16M

repository: 4GB

filter 12k

temp: 350MB

 

So what I see is that the folders other than filedir and repository get very little use on what I would consider a pretty active system. Therefore I would say that using a symlink on those folders would be a non-issue in terms of how they work.

But of course, given their apparant low use, moving them to a NAS seems to have no value.

 

In reply to R.T. Brown

Re: Moodledata Directory

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

It's kind of common sense....

The main file area (that stores stuff for courses et al) doesn't matter that much when it comes to performance - within reason.

Things like sessions and caches clearly do. In the first place you should consider the benefit of storing sessions in the database. I am honestly not sure which is likely to be quicker. You should measure it!

Whatever remains in the files area will obviously benefit from being on the fastest storage that you have available. If high speed storage is at a premium then the caching/session parts can be symlinked to some other place than the main file store. This works fine.

As usual, it depends on your setup and how you use Moodle. You should strive to get some good baseline measures and then change things and see what happens.

I'm not sure what 'not separating the moodledata directory from Moodle's core installation' means? Moodle doesn't care - it's just a file area, there's nothing magic about it. Your file subsystem is either fast or it isn't.

The latest Moodle 2.4 has a substantially rewritten cache API. I don't know enough about it (yet) to say what difference it will make but it looks to give you more control and options.