Stack Matrix Hub (10)
H5P Interactive Content & xAPI Tracking Memory Overhead
Account for Moodle core mod_h5pactivity PHP unzip/library parsing and xAPI state POST bursts when sizing RAM for interactive courses.
+34 MB/worker for H5P · +20% InnoDB writes for xAPI statements
Why H5P Libraries Inflate PHP-FPM Worker RSS
Moodle 4.x embeds core H5P library parsing, semantic validation, and contentbank asset extraction inside PHP workers. Compared to lean MCQ quizzes (~105 MB/worker), heavy H5P interactive courses push individual PHP-FPM workers toward 155-175 MB RSS.
Handling xAPI State Bursts Inside Interactive Video Cohorts
Every checkpoint inside an H5P Interactive Video fires xAPI save-state AJAX POSTs back to Moodle. Combine Redis session locking with memory_limit = 256M (or 384M for H5P package uploads) to avoid fatal OOM errors during contentbank imports.
Measured Thresholds & Configuration
| Course Workload Mix | Avg PHP Worker RSS | Recommended memory_limit | xAPI / DB Write Factor |
|---|---|---|---|
| Core MCQ Quiz Only | 105 MB | 192M - 256M | 1.0x baseline |
| Mixed Quiz + Assignments | 128 MB | 256M | 1.25x baseline |
| Heavy H5P + SCORM | 162 MB | 384M | 1.55x baseline |