Question

Managed DB Disk Usage

Recently one of my managed DBs started alerting me to the disk usage approaching its limit. This baffled me as there wasn’t that much data in the databases. I ran a query on the database to find out the size of the tables and indexes and it totalled 35GB, most of which was in a few storage database and this value seemed accurate.

However I looked at the managed DB settings in DO and it said that it was a 60GB disk. Then I logged into the DO dashboard and the managed DB said it was at 73% disk usage.

Now it’s been a few years since I was at school but I’m fairly sure that 35/60 is not 73%.

I’m miffed as to where the rest of this usage is.

I’m more than happy to pay for more disk space, but when 25GB on a 60GB disk seems to have disappeared, I’m want to understand why before purchase more.

Can anyone offer any tips?


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.

Bobby Iliev
Site Moderator
Site Moderator badge
August 3, 2023
Accepted Answer

Hi there,

Indeed you are correct, 35 is approximately 60% of 60, eg: (35 / 60) * 100 = 58.33%.

The difference that you’re seeing could be due to several factors like the MySQL logs and temporary files and binary log files along with InnoDB storage overhead.

If you are interested, you could use some of the following queries and try to hunt down the ~10% disk usage difference that you are seeing using some of those queries here:

  • Check the size of the binary log files. These logs keep a record of changes to the data, which can be used for replication and recovery:
SHOW BINARY LOGS;
  • As the managed MySQL database clusters are using InnoDB, it’s possible some space is being taken by data fragmentation and the InnoDB storage format. InnoDB tables also have a storage overhead for maintaining row metadata and index data.
SHOW VARIABLES LIKE 'innodb_buffer_pool_size';
  • The MySQL services can also reserve some disk space for temporary files, log files slow query logs and query log statistics, and other operational data.

Most likely if you combine the total usage of all of the above it will even out to the mismatch that you are seeing.

Hope that this helps!

Bobby Iliev
Site Moderator
Site Moderator badge
October 3, 2023

Hi there,

In addition to what has already been mentioned here, you can now add scalable storage to managed database clusters as shown in this video here:

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