We usually employ different MySQL versions for different scenarios. And I realized that similar databases, whith the same amount of tables and data, just because of different mysql versions differs in size from 43M to 223M. (~5x more)

My goal is understand why of that 5x more disk space required..

Some version 5.5.46 have this size:

du -hs /var/lib/mysql/

And some 5.7.11 habe this size:

du -hs /var/lib/mysql/

Inside of it, we use to have those default datafiles like: ib_logfile0, ib_logfile1, ibdata1, mysql..

Within 5.5.46 thay usually have this sizes respectively:

5.1M   ib_logfile0
5.1M   ib_logfile1
26M   ibdata1
6.5M   mysql

..but within 5.7.11 are waaay bigger:

48M   ib_logfile0
48M   ib_logfile1
76M   ibdata1
12M   have also this ibtmp1
25M   mysql

In order to understand all that difference, I took a look to release notes where Oracle writes down what they're changing: https://dev.mysql.com/doc/relnotes/mysql/5.5/en/

But could not find something conclusive. I appreciate your help on that.


I suggest looking at the 5.6/5.7 release notes to see what changed from 5.5.

ib_logfile file size are because the innodb_log_file_size changed from the outrageously small value of 5M to something that actually performs when people update any modest amount of data.

The ibdata1 increase in size might be a result of utf8_mb4 being the default.

System tables support more features and have some bigger fields.

Overall, its not that much. Are you really running on an embedded processor?

  • thank you danblack, and no, embedded processor it's not the case, but we have the almost the same concern about using minimum storaging space as possible. Mar 30 '19 at 3:28
48M   ib_logfile0   -- new default is much better for most applications
48M   ib_logfile1
76M   ibdata1       -- did innodb_file_per_table change?
12M   have also this ibtmp1  -- new feature
25M   mysql         -- lots of features feed into this change

If the size is a big concern, you could lower innodb_log_file_size, but I would not go back to the old 5M. And it is a bit tricky to change that particular setting.

"concern about using minimum storaging space as possible" -- There are a lot of settings that affect RAM that could be lowered. The 5.7 defaults are better for the majority of systems than the pre 5.7 settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.