High CPU consumptions and high Memory Utilization

#1
Configuration:
System
VMWare instance
CPU
4 Virtual CPU with 1 core per socket
Memory
10 GB
OS
Ubuntu 20.04.3 LTS
DB
10.6.4-MariaDB
Webserver
Litespeed 6.0.8 Trial (Upgraded from Apache 2.4)
PHP
LSPHP 7.4.22
PHP – Framework
Laravel 8


When a user visits the website, it creates individual connection with database and there are instances that frequent external API request needs to be established and get the response back and process accordingly.
Scenario:
During load testing using K6 cloud with 200 virtual users we found that processor load is very high reaching 100% in all 4 CPU sockets frequently resulting to return HTTP 500 and 503 errors. Also, memory load is quite high, at times reaching to 90-95%
External App Settings Screenshot attached


Tried Cases to reduce CPU consumption and Memory consumption:
  • In LSAPI App under External Application, reducing parameter for Max Connections and Environment - PHP_LSAPI_CHILDREN has helped in reducing memory utilization for during load testing on K6 Cloud, but still getting handful of HTTP 500 and 503 errors.

Resolution seeking:
Reducing CPU utilization and reduce memory consumption.
 

Attachments

Top