If there are many small websites (about 300) running in light web traffic, should they all use the same pool, or would it be better to have a separate pool for each of them?
Let us assume the websites are trusted and the benefits of having a separate user/group on the pool (e.g. better control of access/permissions) are not considered here.
Usually, I prefer using one pool per website (but maybe not here, read all).
The main reason for that is that is allow for per website php settings. And theses settings could vary based on the websites needs, but also for a better separation of website resources. As for example with altered temporary directories or open_basedir_settings:
You could also use the chroot mode for php-fpm but that's more complex. And in this case, with a chrooted pool, it would maybe be easier to use only one pool for all clients (so a shared chroot, which is not very good n fact). This because things like apc are shared by all pools, and that means using several chrooted pools you could end up with several files having the same paths in different pools, and apc would only store one cached version of the file. In fact in case of apc+chroot the best solution would be running several php-fpm instances, with one pool per instance. Not an easy thing for 300 websites.
Then you can manage how many php process could be used for each website with the pool
pm.[static/dynamic]
settings. Note that for 300 small websites this could become a problem, if a big number of theses website are not active then a big part of your memory will be used by pool process that do not do anything.In your case the traffic is low and websites are light, so having more than 300 (at the very least) pool's process running on your box, doing nothing, is an overkill. And in your specific case I think I would instead use a low number of pools (maybe you can group some websites together, by applications? by versions? by needs?), having each pool able to run several websites. Or maybe only one, I would try to use groups of website to apply some open_basedir restrictions on them but if they all really are the same you could run with one pool only.