~/talk

Optimizing PHP-FPM for Production

Talkat ScotlandPHP 2018 · 2018-10-05..10-06· [php, devops-and-delivery]
slides:none on file

Default distro PHP-FPM often ships with tiny pools (Ubuntu 18.04 example uses pm.dynamic with pm.max_children=5) so increasing to static process mode or raising children to ~25–50 on a dedicated box immediately raises throughput in benchmarks. Turn off opcache validate_timestamps, size opcache (eg 512MB) and warm it on deploy, move sessions to Redis with persistent connections, use persistent DB connections, split work into dedicated pools or separate FPM masters, and offload file send/upload to nginx or serve prerendered HTML to cut I/O latency.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:28Default PHP-FPM configuration
  3. 3:32Monitoring PHP-FPM status
  4. 5:39How PHP-FPM works
  5. 7:04PHP-FPM management modes
  6. 9:55Static mode for production
  7. 12:01Benchmarking PHP-FPM performance
  8. 13:49Small optimizations with big impact
  9. 15:13Logging and access lock
  10. 15:55Optimizing OPcache
  11. 22:20Handling PHP sessions
  12. 24:47Benchmarking optimizations
  13. 26:32Multiple PHP-FPM pools
  14. 31:37Advanced pool configurations
  15. 33:01Separate PHP-FPM master processes
  16. 34:26Scaling PHP-FPM across machines
  17. 35:30Load balancing PHP-FPM
  18. 37:37Slow request logging
  19. 39:22Reducing I/O in applications
  20. 41:32Avoiding unnecessary work
  21. 44:41CQRS and static content
  22. 47:13Closing and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.