I’m running a small MySQL database on the $10/mo server (1GB memory/1 core) and every time I do a “top” & look at NewRelic server monitor, the system is reporting mysql is running at 97-100% CPU.
All the queries seem to be running ok and returning properly. Is there something I should be doing like upgrading to a larger plan? I’m very concerned about the 100% CPU and not really sure what that means.
===
I have 2 databases running and they report (in terms of size)
using:
SELECT table_schema “DB Name”, Round(Sum(data_length + index_length) / 1024 / 1024, 1) “DB Size in MB” FROM information_schema.tables GROUP BY table_schema;
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
@globalninety Did you get a solution to tune MySQL? What was your approach?
Definitely see if upgrading to a server with more cores helps.
Before you do that also try using Dynimizer. It will improve CPU efficiency for MySQL OLTP workloads. If you have a very high query/transaction rate then this will help. Will either boost throughput or reduce CPU usage, depending on where your bottle neck is. I’ve benchmarked speedups by up to 50%. Installation is a bash one-liner and because it’s software it’s a free solution and should be applied before upgrading your server. MySQL restart not even required. But you’ll need to increase swap space by 4 GB unless you have that much extra to spare or you have > 4 GB of unused RAM:
Install:
sudo bash -c 'bash <(wget -O - https://dynimize.com/install) -default
Quickstart:
https://dynimize.com/blog/tutorials/beginner/dynimizer-quickstart-tutorial/
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.