BLUEPRINT 01
Translate simultaneous exam takers and quiz submit clicks into exact pm.max_children counts using 105-162 MB per Moodle 4.x PHP worker.
105-162 MB/worker · ~5:1 student-to-worker peak · pm.max_requests=500
BLUEPRINT 02
Eliminate PHP-FPM worker starvation caused by flock() serialization on moodledata/sessions by tuning Redis session_redis_acquire_lock_timeout.
Sub-1ms Redis lock · session_redis_acquire_lock_timeout=120 · Zero flock() stall
BLUEPRINT 03
Prevent mdl_question_attempt_steps and mdl_grade_grades write stalls during final-minute exam submissions with proper InnoDB buffer and log sizing.
innodb_buffer_pool_size 25-35% RAM · innodb_log_file_size=512M · trx_commit=2
BLUEPRINT 04
Prevent OPcache full-cache eviction storms across Moodle 4.x 15,000+ PHP files by sizing opcache.memory_consumption and interned_strings_buffer.
256-384 MB OPcache · 32-64 MB interned_strings · max_accelerated_files=32531
BLUEPRINT 05
Isolate scheduled cron.php and adhoc_task.php memory spikes from interactive exam PHP-FPM pools so PDF annotation and grading never starve students.
task_adhoc_concurrency=3 · Separate CLI memory_limit=512M · 60s systemd timer
BLUEPRINT 06
Quantify how Moodle 60-second quiz autosave periods create periodic request waves and how widening autosaveperiod slashes peak worker pressure.
autosaveperiod 60s -> 120s cuts AJAX RPS 50% · Redis lock keeps saves < 25ms
BLUEPRINT 07
Keep localcache and temp/requestdir on local NVMe even in multi-web setups so Moodle PHP stat() storms never choke over NFS.
localcachedir on local NVMe · 15x faster theme/JS cache · Zero NFS lock stall
BLUEPRINT 08
Prevent silent gradebook truncation and large assignment upload failures by sizing max_input_vars=5000 and post_max_size in PHP-FPM.
max_input_vars=5000 · post_max_size=128M · max_execution_time=120
BLUEPRINT 09
Eliminate Nginx upstream buffer disk spills and upstream timed-out errors during heavy Moodle course exports and SCORM ZIP streaming.
fastcgi_buffers 16 32k · X-Sendfile / X-Accel-Redirect · Zero PHP file reads
BLUEPRINT 10
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