مطالب مطرح شده توسط Ray Morris

Moodle in English -> Hardware and performance -> Quiz performance with large concurrency

از Ray Morris در

Moodle is large and full featured, like a Winnebago as opposed to a motorcycle.  How do you make a Winnebago go 160 MPH?  You dont.

You either break it up so the 20,000 users take the quiz at different times, or you run the quiz outside of Moodle and import the grades into Moodle if needed.  A simple quiz handling script could serve 1,000 times as many users as Moodle on  the same hardware.  Small is fast, just like a motorcycle is faster than an RV, so if it needs to be fast, choose something small, and use proper indexes on the database tables.

 

If you can work on the Moodle PHP code and databases, there is lots of room for improvement.  Adding the right indexes on database tables, for example.  You can add those where needed (based on measurements) with the XMLDB editor and submit back a patch.  Profile your Moodle, with your quizzes,  using Xdebug or similar and I'm sure you'll find 80% of the time is spent in a few inefficient functions.  Those will probably be loops calling the same query foreach() thousands of times when it could use ONE query to retrieve or update the whole set of records. Patch and submit.

Technically, you COULD strap a huge rocket engine to an RV, and similarly you COULD use ten times as much hardware to serve ten times as many users.  Assuming you've already done the things discussed in the performance forum, like a PHP opcode cache, then find the hardware bottleneck.  It's probably your disk drives in the database server, but actually check for yourself.   If it's the drives in the DB server, put in a 16 wide RAID 10 array of SSD drives and then find the next bottleneck.  I've found 3U server with 16 drive bays and RAID cards for under $1,200, so you don't have to spend $25,000 on Netapp to go big on hardware.  (Contact me for more info if you want to go this "rocket engine" route with affordable hardware.)

 

میانگین امتیازات:  -

Quiz imports are known to be a little funky and there is work being done in that area.  The root of the complexity is that the same question may be used in different quizzes, in different courses.  Should exporting and importing a quiz include importing all of it's questions?  You'd say yes, if thinking about one quiz.   What if you have 100 quizzes all using the same question bank?  You don't want to end up woth 100 copies of basically the same question.

 

What you can do to help solve the issue:

 if I uncheck all of the quizzes/tests/exams and do the import, everything comes over

Narrow down the minumum scenario that as the problem, then report it so we can fix it.  We don't want to go through ten of your quizzes, with 40 questions each, to figure out which of those 400 questions has the problem.  You get to do that part.

Try unchecking half of the quizzes.  Does it work?  If not, how about if you uncheck 3/4 of them?  No?  How about if you uncheck all but one?  Still no?  Uncheck until it starts working, then check one more, etc. to figure out exactly which quiz is causing the problem.  Once you can say "THIS quiz has a problem", that puts us a lot closer to helping you.  Then, save a copy of the exported file that didn't work and try deleting some of the questions from the quiz to see if it works.  Eventually, you should end up with one quiz that has one question and it doesn't work.  Then you can tell the developers "this specific question has a problem importing".  Then we can fix it.

 

 

 

I'd like to know how other people are handling the following scenerio.  We'd like to know when an enrolment expires without the course being completed, where the student gets a grade of "I" (incomplete).

 

One way of triggering that that, and keeping track of which incompletions have already been handled,  is to set the enrolment plugin to unenrol or suspend the user and remove all of their roles upon expiration.  However, removing the student role makes them invisible to gradebook, attendance register, etc., so you can no longer lok and see "what as been the average grade in this class" or "how long do students normally spend in this class".  So that option doesn't work too well.

 

What do you do with this?  I'm thinking of patching the enrolment plugin or creating a local plugin which suspends te enrolment, but does NOT delete the student role.  That way gradebook, attendance register, etc. can still report their historical information or include it in summary statistics.  (Gradebook gets a simple patch to enable this option which is mostly there by default, just hidden with no GUI.)  Any comments on that approach of suspending the enrolment, but not removing the roles, when the enrolment expires?

 

It necesary to either susped te enrolment or remove it or someting so that you can tell which ones have already been handled and which have not.
(SELECT * FROM user_enrolments WHERE timeend < now() AND status=active).

 

 

میانگین امتیازات:  -

Moodle in English -> General help -> Too Many Users -> Re: Too Many Users

از Ray Morris در

For people having this problem, what are you searching for?  All users with a certain role?  All users in a certain course?  If most se cases have in common that you're looking for "all users in (some set), perhaps it would be better to add a UI like this:

Select all users in:

  • Course
  • Group
  • Role
  • Cohort
  • Moodle 101
  • GUI design 201
  • Into to Web Interfaces

 

Regardless of ones opinion about the limit, having the same constant defined in different places, and possibly with different names, is objectively incorrect™. It should be a setting, or a single constant. ONE setting if it has the same meaning in various places, possibly two settings if the same constant is used for two distinctly different things which logically might be set differently.