Question

Managed MySQL Performance

Hi,

I run currently a managed server with a different provider. 4 CPUs 16GB ram. Hardware is 10 years old.

We want to move into the cloud to be mor flexible but I see big difference in the MySQL Performance.

I just wonder if this is normal or I do just something wrong.

For testing purpose I exported an SQL dump and imported it on Digital Ocean and tried different Server configurations.

I tried different SQL queries which I logged from my production server. (So this are real world examples)

  • My current Server: 0.0044 sec
  • DO Premium AMD 1vCPU 1GB: 0.0784 sec
  • DO Premium AMD 4 GB RAM / 2vCPU: 0.04 sec
  • DO Premium AMD 16 GB RAM / 4vCPU : 0.04 sec
  • DO Premium Intel 8 GB RAM / 4vCPU : 0,06 sec

Why is the performance 10 times slower on DO and why is the speed not increasing with moving to a higher DB version with more CPU and RAM?

Thank you :)


Submit an answer


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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Same issue here. I’ve given managed databases a try, and turned out to be slower than the database I have on the same server.

I am surprised noone posted an answer to this question. We are experiencing the same issues!

Bobby Iliev
Site Moderator
Site Moderator badge
October 23, 2023

Hi there Phil,

Thank you for sharing the detailed performance metrics! That is quite an interesting test!

The results that you’ve shared are quite consistent and one thing that comes to my mind at a first glance is network latency.

Are you by any chance running the queries on your old server when directly connecting to it via SSH and then running the queries directly there?

When you run queries on a server directly, you’re likely doing so with minimal latency since the client and the server are either on the same machine or in the same local network.

With DigitalOcean’s Managed MySQL, if your client machine is not in the same data center or region as the Managed Database, you might experience additional network latency. This latency could account for a portion of the time discrepancies you’re observing.

To get a clearer picture, consider running a ping from your client machine to the DigitalOcean database’s endpoint to see the round-trip time. If this time is significantly high, it can add up over multiple queries.

What you could try is to spin up a Droplet in the same VPC where your Managed database cluster is, that way you will see the actual latency that your app would experience rather than the whole trip from your local network to the DigitalOcean Managed instance.

Is the dataset that you are testing this with publicly available? I could give this a try as well and try to further look into it.

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel