in the not too far future. We have web load balancers feeding two Debian/Apache servers
that use the Oracle OCFS clustered file system. We are using a mysql/innodb database on a
separate server. Could anyone advise on selecting between File or Database sessions.
The admin page option at
Has a checkbox for
Use database for session information
The help next to it says
"...This is especially useful for large/busy sites or sites built on cluster of servers. "
Which I think describes our use
So I was thinking of switching to database sessions. However the documentation at
"The performance is relatively low, it is not recommended for large sites."
Can anyone advise?
You almost certainly can't use file-based sessions if you are load-balancing. They need to be located in a shared-file area and the chances are that this will be far too slow (if NFS for example).
You also shouldn't use the database on a very busy site (almost certainly you) as it can bung up the database quite easily with the high levels of activity.
If you search down config-dist.php a bit further, you will see that you can set up sessions on memcache/memcached. This is the way forward.
A word of warning, if you are using memcache/memcached in the MUC then you will need to set up another instance for sessions. If you don't, purging the MUC caches will also throw out all your users.
It looks like we are using file based sessions and they are on a shared area done through OCFS. Is there a way of getting a metric on the creation and access of sessions, i.e. to compare what happens at the moment with what would happen if it were on non shared disk space.
What do you mean by non shared disk space? If you are using a cluster then all the apache nodes need their session files on a shared location otherwise each time a user's request jumps to a different apache node they will have to log in again.
So memcache/memcached seems to be the only way to go for big Moodle sites. But does memcache/ memcached run well on Windows Server OS? Is it a viable way to do session management on Windows*?
I've got a test server running Memcached, but working out what Memcached is doing, how it's doing it and if it's doing it well is another story!
* Ok some may argue that nothing runs well on Windows, but lets not go there...
Sorry, no idea. I'm not a Windows user. Set up a Linux box with memcache(d)?
How did you go with setting up Memcached on Windows? I was looking at this a couple of months ago and kept hitting issues and could only use memcache not memcached.
Out of interest are you running on Windows 2012 or something earlier? We recently went from 2008 to 2012 and are having a lot of performance issues (which is why I was looking at the caching solutions).