0

I have been testing a custom PHP script on LOMP (Ubuntu 22.04) running on VirtualBox (2GB/2Core). First, I tried Apache and upon benchmarking the script, it could complete 10K requests in ~36s - ab benchmark on Apache

Then, I installed LOMP and tried the same script after tweaking a few things under Server configuration (CPU Affinity, etc.). And, this time, it took 410s - ab benchmark on OLS without LSMCD

Later, I learned about LSMCD and gave it a try. This resulted in time being brought down to 185-250s - ab benchmark on OLS without LSMCD

What baffles me is the CPU usage when running OLS (with or without LSMCD). It never goes above 20% on a core, while the other core is under 5% when benchmarking. On the other hand, Apache easily hits 100% CPU when benchmarking. I believe I could get better results on OLS if I could make it use more CPU, but I don't have the least idea how. Have been searching for a solution for the past few days with no luck.

UPDATE - Just to check, reduced cores to 1, and re-ran ab. Guess what, the time remains the same, yet again proving that OLS refuses to use the machine's capacity to full. Any solutions?

1 Answer 1

0

Figured it out. I noticed this issue didn't exists with MySQL. Turns out mariaDB has a max_connections parameter. I edited it under the file /etc/mysql/mariadb.conf.d/50-server.cnf and then ran the benchmark. There's still some throttling after some time, that I need to figure out. But, CPU usage did hit close to 100%.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .