Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F #3393: Add information about DB maintenance #655

Merged
merged 2 commits into from
Jun 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions source/deployment/opennebula_installation/mysql_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,23 @@ Using OpenNebula with MySQL
===========================

After this installation and configuration process you can use OpenNebula as usual.

MySQL database maintenance
===========================

For an optimal database performance there are some tasks that should be done periodically depending on the load of the environment. They are listed below.

Search index
----------------------

In order to be able to search VMs by different attributes, OpenNebula's database have a `FTS index <https://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index.html>`__, the size of this index can increase fast depending on the cloud load. For freeing some space it is needed to perform the following maintenance task periodically:

.. code::
alter table vm_pool drop index ftidx;
alter table vm_pool add fulltext index ftidx (search_token);
VMs in DONE state
----------------------

When a VM is terminated OpenNebula change it's state to DONE but it keep the VM in the database in case the VM information is required in the future (e.g. to generate accounting reports). In order to reduce the size of the VM table, it is recommended to periodically delete the VM in DONE state when not needed. For this task it is available the `onedb purge-done <http://docs.opennebula.org/5.8/deployment/references/onedb.html#onedb-purge-done>`__ tool.