Skip to content

Instantly share code, notes, and snippets.

@chrismeller
Last active December 12, 2015 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chrismeller/4747097 to your computer and use it in GitHub Desktop.
Save chrismeller/4747097 to your computer and use it in GitHub Desktop.
processes.conf
[www]
; at any time, there can be no more than 5 child processes
; if you know how much memory each process consumes regularly
; and how much free memory you have on your system, this is how
; you set a "hard limit" on the amount of memory php-fpm will be able to consume
pm.max_children = 5
; when php-fpm first starts, how many processes should
; it immediately generate to handle requests?
; when you restart php-fpm, there may be an influx of requests.
; spawning a new process can take time (albeit very small), so we want
; to go ahead and have this many ready to go
pm.start_servers = 2
; if there are no requests currently, how many spare
; processes should we always make sure to keep around?
; again, there is a delay in spawning new processes,
; so having a few always ready to go is a good idea.
; the offset is that they will be taking up memory that your system
; might otherwise be able to use for other things
pm.min_spare_servers = 1
; the inverse of the former. if there's nothing going on,
; how many spare processes are we allowed to keep around?
; again, fewer means more memory on the system for other things,
; but more means less of a delay if an influx of requests comes in
pm.max_spare_servers = 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment