0

My current server has 12 cores and 96gb of RAM. But due to my MYSQL queries, up to 100% of the server is always in usage while ram is less than 5%. I know the major issue is with the SQL queries. From logs, it turned out to be some queries that sums up values in all columns. Now due to how huge the application is, optimizing the queries will not be possible in the short term.

As a short term solution, should I get a new server with 32 cores? Or is there a way to move some of the processing power to the server's RAM? That way over 90gb of RAM won't just be going to waste.

3
  • Tune your queries. Apr 18, 2022 at 21:06
  • less than 5% including buffers?
    – Jasen
    Apr 19, 2022 at 2:49
  • Additional information request, please. Any SSD or NVME devices on MySQL Host server? Post on pastebin.com and share the links. From your SSH login root, Text results of: A) SELECT COUNT(*) FROM information_schema.tables; B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; AND very helpful OS information, includes - htop OR top 1st page, ulimit -a for list of limits, iostat -xm 5 3 for IOPS by device and core/cpu count, for server workload tuning analysis to provide suggestions. May 2, 2022 at 14:05

1 Answer 1

2

No.

I have yet to see a MySQL server that ran out of cores before running out of other resources.

Often, high CPU usage is cured by adding a better index (especially a composite index) and/or reformulating some slow query.

Find the slow queries and let's discuss them. SlowLog

"Low RAM usage" usually means a too-low value of innodb_buffer_pool_size. That setting should be about 70% of RAM. However, a low setting of that usually implies high I/O, not high CPU. Please show us SHOW CREATE TABLE and SELECT... for some naughty queries.

You must log in to answer this question.

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