0

I have been hitting my head against a wall for a couple of days now. One of our sites has thousands of concurrent users but I have been unable to get the nginx & mysql to use available memory and CPU resources.

So far mysql only seems to use 1 of the 8 cores available and nginx is even worse. How can I set them up to use the maximum available resources?

I have modified ulimits and mysql config files for hours without much effect.

SamTzu
  • 167
  • 1
  • 7
  • 1
    This all depends on your application. What is the language serving the page? Are you using connection pools? A single thread being consumed by MySQL makes it seem as if your application is single threaded and not using a connection pool. – Matt Clark May 04 '17 at 19:02
  • PHP pdo Laravel – SamTzu May 04 '17 at 19:24
  • Firstly, see [this guide](https://www.nginx.com/blog/tuning-nginx/) on tuning nginx. – Matt Clark May 04 '17 at 19:30
  • Thx. I'm more worried about mysql not using max allowed CPU & memory in LXC container. – SamTzu May 04 '17 at 19:58
  • Why would it if it's not under load? Tune nginx first, which will allow more load on your app front, this will in turn cause more load on the database. High CPU load on a database is not a good thing... – Matt Clark May 04 '17 at 20:08

0 Answers0