We are running MySQL 5.0.77, and implemented our first production InnoDB database a few months ago. The database is on a dedicated server and is composed of 14 tables. No tables have been added or dropped since creation.
The “ibdata1” file is growing much faster than the database itself. The ibdata1 file is currently 3.8G. The database takes up 533M. 3.2G of the file is composed of free extents. This matches the “InnoDB free” value.
Here is my understanding of what is stored in the ibdata1 file:
- User data
- Tablespace header
- Data dictionary
- Double-write buffer
- Insert buffer
- Rollback segment, AKA undo log.
I believe that the double-write buffer is always 2M. The insert buffer has been up 6.1M.
By a process of elimination, I think that the undo log (which can expand and contract) must account for the additional space, most of which is currently not in use.
One other mysterious clue: The InnoBD tablespace monitor shows 145 segments of 1 page each. I believe that a handful of these are used for “system” stuff like the data dictionary because I see them in every ibdata1 file. But I do not normally see so many.
- Can anyone verify that the additional (presently unused) space was allocated for the undo log?
- Are the many 1-page segments a leftover from a large undo log?
Please note that I am NOT asking how to reclaim the space. I don’t think there is any point in doing that until I understand what is happening here.