Moodle Performance Problems (split)

Re: Moodle Performance Problems (split)

by Paul Verrall -
Number of replies: 3

RAM might not be your problem. But before we assume it is or isn't how about checking your utilisation and swapping first.

You have a clustered setup, how are you sharing your 'moodledata' folder between them? 

I'll take a punt and guess NFS, have you configured your 'localcache' and 'temp' folders to not be on the NFS? Have you put the Moodle code on NFS?

Have you configured your OPCache?

Does memcached have it's own instance, or have you clustered it between your two hosts? You have insanely high allocation btw, I'd be surprised if either cache ever exceeded 64MB. This isn't an issue really as (I think?) memcached does not preallocate, it's just unnecessary.

Then again, maybe it is RAM.

In reply to Paul Verrall

Re: Moodle Performance Problems (split)

by Pupil Senpro -

Yes, you're right.
I'm added the RAM to 4 GB, but still no luck.

 - For "moodledata" folder, I'm sharing it using s3fs.
https://github.com/s3fs-fuse/s3fs-fuse

-  For localcache folder, i have put it outside "moodledata" folder. But for temp i haven't make it yet. Here's my "moodledata" content.

My moodledata content


- What is mean by moodle code on NFS?  Sorry, forgot to mention I'm a system Engineer and problem related code handled by the Developer.

- I haven't configured the OPcache yet. Anyway, can you elaborate more why I need to configure OPcache?

- For the memcached, It have the own instance. I'm using ElastiCache for the memcached. And 555 MB is the smallest node type.


In reply to Pupil Senpro

Re: Moodle Performance Problems (split)

by Paul Verrall -

I don't know much about s3fs I'm afraid. Looking at https://github.com/s3fs-fuse/s3fs-fuse#limitations I do have some concerns though, specifically, 'no coordination between multiple clients mounting the same bucket'.

I could be misinterpreting this massively, but I think this could be an issue (see https://docs.moodle.org/27/en/Server_cluster#.24CFG-.3Edataroot). While locking shouldn't be an issue for moodledata it will be for 'temp' and 'cache'.

Even if you move these to a more suitable location (cache still needs to be shared with all nodes) I would still look at setting 'preventfilelocking' in your config.php.

My comment regarding 'moodle code on NFS' is better written as 'moodle code should not be on a network file system', it makes things really slow, so each node should have it's own local copy of the codebase.

Opcache is important, see https://docs.moodle.org/30/en/OPcache.

Does ElastiCache give you some stats about your usage? if so I'd over-allocate and then reduce the size once I establish what the real use is (I assume bigger elasticaches cost more $$$).

After all this though Tim is probably most right, networks add latency.

Average of ratings: Useful (1)
In reply to Paul Verrall

Re: Moodle Performance Problems (split)

by Pupil Senpro -

Yeah I've thought about it. We suspect that s3fs is the culprit. and  we want to try using NFS rather than s3fs. But i haven't try it. Soon I will.

Of course each node should have it's own local copy of the codebase. I don't share them.

Ok, I will give a shot regarding opcache.

Yeah it give some stats, Actually I can see several metric from the CloudWatch. But, i don't know which metrics will matter.


Yeah, Tim probably right. I've just want to improve the performance until there's no can be improve.
Thanks.