MySQL Forums
Forum List  »  InnoDB

Automatic Extension Question
Posted by: Derek Shinaberry
Date: June 20, 2014 08:38AM

I'm supporting a web application that uses mysql for its database. Our install uses Linux and mysql version 5.1.52. I wasn't around for the inital installation and configuration. I think it is a default installation as far as the database is concerned. I know that the database uses the InnoDB storage engine. We've been using a database query to track database size and free space. I think someone found this query online.

SELECT table_schema "identityiq", sum( data_length + index_length ) / 1024 / 1024 / 1024 "Data Base Size in GB", sum( data_free )/ 1024 / 1024 / 1024 "Free Space in GB" FROM information_schema.TABLES GROUP BY table_schema;

We run the query daily and track the results in a spreadsheet and attempt to forecast when the free space will run out. Based on this forecast we are within a month or so of exhausting the free space.

I am not a mysql expert, but based on what I have been able to find I think the query isn't quite right because it assumes a per-table tablespace and it looks like the setup is a shared tablespace. I also read some information that seemed to indicate that a default setup using the InnoDB storage engine will automatically extend the database. The documentation I came accross referred to using system variables in the my.cnf file to define this, but our my.cnf doesn't contain any innodb variables.

I discovered the mysql command "show variables;" which shows "innodb_data_file_path ibdata1:10M:autoextend" and "innodb_autoextend_increment 8". This makes me think that the database will automatically extend itself when it runs out of sapce. What seems strange though is that the shared tablespace currently has around 1.2GB of free space. If the database file started at 10MB and autoextends in increments of 8MB, then how did it come to have 1.2GB of free space?

I think this won't be a problem, but I'd rather be certain that it will automatically extend than risk having a problem when the free space runs out.

Can anyone confirm my hunch about this?

Thanks,
Derek

Options: ReplyQuote


Subject
Views
Written By
Posted
Automatic Extension Question
1901
June 20, 2014 08:38AM
824
June 26, 2014 02:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.