0

I've got configured apache2 and php7.2-fpm. Machine has 32 vCPUs and 192G ram. FPM is set to static mode with 1200 pm.max_children. When 400 fpm process are started the platform is slow and load average on system peak up to 230 and meanwhile CPU max is 40%. I think that something is not configured correctly

EDIT: After I made the following changes: pm.max_children = 64 the platform is handling better(~40% load average constantly and ~40%CPU usage) but with 2500 users in GA it's slowing down. I still think that there is config issue. Apache rate of request show this: Apache requests

While fpm shown such graphic: FPM requests

What do you think could be the issue?

Lyubo
  • 1
  • 1
  • Please post at minimum your fpm and apache configs, as well as a sample of your diagnostic tools (`top`, `ps`, `iotop` etc) output. – Gary Sep 23 '19 at 14:10
  • Hello, my config were: php fpm mode : static pm.max_children: 1200 Apache config is: ServerLimit 32 StartServers 20 MinSpareThreads 512 MaxSpareThreads 2048 ThreadLimit 128 ThreadsPerChild 64 MaxRequestWorkers 2048 MaxConnectionsPerChild 50000 – Lyubo Sep 24 '19 at 09:09
  • PHP can be very CPU intensive. PHP with Wordpress can take 25 - 75% of a CPU core, which assuming 75% means with 32 cores you can have about 40 processes running at the same time without slowing down. 400 processes means each gets 10% of a core, which isn't much. I suggest you consider caching, if appropriate, which can massive reduce CPU usage, otherwise you may need to add more CPU resource - scaling horizontally is typically the easiest way. – Tim Sep 24 '19 at 09:26
  • Some caching information [here](https://www.photographerstechsupport.com/tutorials/hosting-wordpress-on-aws-tutorial-part-4-wordpress-website-optimization/) about Nginx, just as an example - I wrote it so I have the link to hand. With Wordpress I can cache all pages requests from users who aren't logged in, so my server is barely loaded. – Tim Sep 24 '19 at 09:26
  • We are talking about Laravel, not WP. We use CDN and Redis a lot. I think we'll need to scale horizontally really. – Lyubo Sep 24 '19 at 09:27

0 Answers0