We have a PHP image api written in Code Igniter that's based on imagemagic. We have the api behind nginx/php-fpm. We know the Imagemagic part is heavy, but we try to make the overal throughput higher and higher.
We have went over of more than 30 optimization articles about Nginx. We were able to increase output from 300 requests/minute to 350 request/minute by mostly following the articles and doing TCP optimizations.
By this we seriously affected server load time. There is no avg load I can tell you, as this is a new box, and it's Nginx based. We had in past Apache workers (less than 300 request/minute). Now with 350req/m we have an AVG load of 20. Which is way too much, and we are looking to improve.
When we use htop to investigate the processes, usually we see around 20 processes of php-fpm that are heavily using all 16 CPUs, and memory is somewhere at 2GB out of 24GB.
We aim to reduce system load drastically. I would like experienced users to share their knowledge where to look, what to try. I will post whatever numbers you are requesting, but I didn't wanted to full the post with that at the beginning.
How would you proceed to reduce system load but still keep the throughput.