Score:0

Apache bottleneck by CPU?

vu flag

I'm trying to serve many concurrent (3000+) users on my website.

My current setup:

Ubuntu 18.04

Apache 2.4 with MPM Event and PHP FPM

32 cores, 192GB RAM

Current MPM event config:

<IfModule mpm_event_module>
StartServers 100
ServerLimit 4
MinSpareThreads 500
MaxSpareThreads 1500
MaxRequestWorkers 2000
ThreadsPerChild 500
ThreadLimit 500
MaxConnectionsPerChild 0
MaxKeepAliveRequests 1500
KeepAlive On
KeepAliveTimeout 10
</IfModule>

PHP FMP config:

pm = static

pm.max_children = 3000 pm.max_requests = 10000

A process takes about ~40MB of RAM, and so fare only 40GB out of 192GB are being used

I tried different combinations but I can't fill the RAM to serve more concurrent requests.

At the moment it seems that the CPU is bottlenecking everything, going to 100% usage and if I'm logged in the terminal I can't run command, getting this error

bash: fork: retry: Resource temporarily unavailable

Can someone point out what's wrong with my configuration? And which others config I should touch?

It generally seems to slow down between 750 and 900 active users on the website. Disk I/O and bandwidth looks fine and not overloaded.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.