Manual enrolment and unenrolment very slow

Manual enrolment and unenrolment very slow

von Peter Heinrich -
Anzahl Antworten: 8

We have installed Moodle 4.1 on two virtual servers - one for Postgres, the other one for Moodle on Apache. We upgraded it several times so now it's 4.3 version. Each server has 32GB RAM and 4 CPU cores. I noticed that some functions take a long time. For example, enrolling 1000 users takes about 20 seconds, and unenrolling about 50 seconds when no one is using the system. I wonder what will happen when we try this with 20.000 users. We analyzed what is going on under the hood and found that  there are thousands of cursors opening on the database, each performing about ten queries so there are tens of thousands of SQL queries executing sequentially and that takes time of course.

Is there anything we can do about this performance issues? Can those queries be somehow grouped or optimized or something?

Mittelwert:  -
Als Antwort auf Peter Heinrich

Re: Manual enrolment and unenrolment very slow

von Visvanath Ratnaweera -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Translators
What are the results of Moodle Benchmark?
Als Antwort auf Visvanath Ratnaweera

Re: Manual enrolment and unenrolment very slow

von Peter Heinrich -

There's no version for Moodle 4.3.

Als Antwort auf Peter Heinrich

Re: Manual enrolment and unenrolment very slow

von Visvanath Ratnaweera -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Translators
Sometimes the developers don't test at the rate Moodle versions are being released. Since this is a local plug-in, I imagine it to be robust. You could try it on Moodle 4.3.
Als Antwort auf Visvanath Ratnaweera

Re: Manual enrolment and unenrolment very slow

von AL Rachels -
Nutzerbild von Core developers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers Nutzerbild von Testers
I'm pretty sure it will work on 4.3 because I just ran benchmark on my Moodle 4.4 development site and it worked just fine.
Als Antwort auf Visvanath Ratnaweera

Re: Manual enrolment and unenrolment very slow

von Peter Heinrich -
Everything seems to be fine except database performanse:

Reading course performance: 0.744 (acceptable limit: 0.75, critical limit: 1)
Writing course performance: 0.095 (acceptable limit: 1, critical limit: 1,25)
Database performance (#1): 0.239 (acceptable limit: 0.5, critical limit: 0.7)
Database performance (#2): 0.422 (acceptable limit: 0.3, critical limit: 0.5)

This doesn't make sense because no one is using the system yet, database is Postgres recent version, installed on a dedicated server with plenty resources.
Als Antwort auf Peter Heinrich

Re: Manual enrolment and unenrolment very slow

von Visvanath Ratnaweera -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Translators
Pl. attach a complete screenshot.

You can compare the results against the others here:

- [Moodle BenchMark] Need Beta-tester Original discussion. Moodle Benchmark has been fully revised since then.



Als Antwort auf Visvanath Ratnaweera

Re: Manual enrolment and unenrolment very slow

von Peter Heinrich -
Als Antwort auf Peter Heinrich

Re: Manual enrolment and unenrolment very slow

von Visvanath Ratnaweera -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Translators
Did you look at the sample results? They may be quality VMs, but for their resources, web server 4 vCPU / 32GB RAM, and equal database server, I find the numbers are disappointing. 4 good vCPUs and silicon arrays for storage should be well below 100, may be half of that. The weakness comes from the database.

That said, you are comparing Moodle 4.1 LTS to 4.3, everything else being equal, right? The 4.1 LTS was on this very same server duo, no system software - PHP, PostgreSQL, web server - has been changed or upgraded?

I am not qualified to talk about Moodle 4.3, my prod. instances all are on 4.1 LTS - for a reason. I wanted to open the dialog so that others who know 4.3 may join.

Specific system software as requested in Before you post.. read this.. could also be informative.