-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
2.5
-
MOODLE_25_STABLE
Just a forewarning - this may turn out to be a wild goose chase.
I've a site that has 501 courses on it.
Each course has 3 managers, 20 teachers, and 250 students (can you tell I used a script to populate this site).
The front page is set to show a list of courses for users who are not logged in.
When viewing the front page without logging in I am seeing 9158 reads, and 1001 writes (consistently).
The reads is fine, we know that area to be pretty horrid, but the writes looked mighty suspicious.
I ran a simple hash count on the queries being executed and tracked the writes back to two SQL statements:
Statement | Calls |
---|---|
UPDATE mdl_course SET modinfo = $1,sectioncache = $2 WHERE id=$3 | 501 |
UPDATE mdl_cache_text SET md5key = $1,formattedtext = $2,timemodified = $3 WHERE id=$4 | 500 |
Cache text lifetime is set to 1 minute and this page is taking 45s+ to generate so the cache_text statement probably makes sense in a (puke) kind of way.
However I've no clue about the call to update modinfo and section cache. I would guess something is wrong there (why on earth would be update those every single request)
So the point of this issue, work out why that is happening and see if we can't save a few DB writes.
- has been marked as being related by
-
MDL-40035 rebuild_course_cache runs over and over for empty course
-
- Closed
-