LDAP Sync_users spectacularly slow (AWS)

LDAP Sync_users spectacularly slow (AWS)

by Nelson Bartley -
Number of replies: 1
Good Day,


So I am running Moodle 3.0.2 on a AWS t2.micro server (we are preparing for a new deployment in early march). It is currently communicating to a separate t2.micro for database, and another for LDAP

The DB is running PGSQL, the LDAP is 389-ds. 

The LDAP currently has approx 2250 users in it. It has another ~50 courses these users are registered in.


LDAP AUTH takes approximately 35 minutes to sync all these users. Each user takes approximately a second. During this entire time PHP is running at approximately 70-90%, using about 100MB of memory. This amount of time is the same if users are being created or updated.

Previously, when the script had about 1500 users to deal with it operated in about a quarter the time. 

What could be slowing down the sync so much as users increase? 


For the record enrol takes barely a minute to process all these users into their courses. 


Average of ratings: -
In reply to Nelson Bartley

Re: LDAP Sync_users spectacularly slow (AWS)

by Jamie Kramer -

First thing that comes to mind is to check your cpu credits on each of the EC2 instances. See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html#t2-instances-cpu-credits

In the AWS console you can go view the instance, and see a graph of the cpu credits. I wonder if you are bumping up against your available cpu credits.


Jamie