Linode 2G optimazation with Nginx+php-fpm
I'm a newbie and ask for some help on Linode 2G optimazation.
I've just upgraded Linode 1G to 2G,and installed Nginx+php-fpm.
I made a separate configuration file of nginx.conf for my domain.
Can anyone give me some suggestion on how to optimize Nginx+php-fpm for Linode 2G ? Thank you!
Configuration of .conf will be better :)
Thank you!
2 Replies
If your server was doing OK with 1G (perhaps a bit slow, but fine other than that), you just need to let each service consume a bit more RAM now that you have some breathing room.
If you have a database such as MySQL or PostgreSQL, letting it use more RAM for its buffers (keybuffer, innodbbufferpoolsize, shared_buffers, or whatever setting is relevant to your database) will probably be the single most important adjustment that you can make. Let your database use 25-30% of your RAM.
If you were previously having trouble with the number of concurrent visitors that php-fpm could handle, you might try increasing pm.max_children a bit as well. But don't make it too high. 10-12 is probably the maximum amount that a 2G Linode can sustain while running a typical PHP application.
Other than that, do nothing and just let the kernel use the extra memory in whatever way it sees fit.
Thank you for your suggestion!