[Openstack] [Nova] MySQL drivers in DB

Jay Pipes jaypipes at gmail.com
Wed Oct 12 13:00:17 UTC 2011


On Wed, Oct 12, 2011 at 7:54 AM, Gabe Westmaas
<gabe.westmaas at rackspace.com> wrote:
> +1 on modifying it in your environment,  this seems outside the scope of
> migrations, though perhaps listed as a "best practice" for the deployment
> process.

+1

> Similarly, I have been trying to decide what makes sense for indexes.
> Right now it would be a bad idea to run nova without adding some indexes,
> but I'm also not sure if this belongs in migrations, I was also thinking
> this belonged in a "best practices" document.  I'm concerned about that
> being a part of an upgrade and negatively affecting a deployment that
> might have millions of rows in a table that to which a migration adds an
> index.  At the same time we have to deal with this when we do other
> operations on large tables (adding or removing columns, for example), so
> maybe I shouldn't be so concerned about it.  Any thoughts?

I think it would be best to leave storage engine selection and
performance-based indexing (as opposed to indexes used for constraints
or relations) to a best practices document and let deployers deal with
that. Particularly in the case of MySQL, what may be good for one
organization may not work for another, and hardcoding into the
database schema one deployers best indexing strategies may actually
degrade another deployers performance. The distribution of key values,
the size of a data set, and a deployment's querying patterns all make
a big difference in what impact (good or bad) that indexes can have on
a database.

Cheers!
-jay

> On 10/11/11 5:15 PM, "Vishvananda Ishaya" <vishvananda at gmail.com> wrote:
>
>>For some reason tables are getting created as default type.  There is a
>>migration in the history to convert tables to InnoDB, but anything
>>created after that migration will go in as the default type.  We can add
>>another migration to convert all of the other tables, but I think the
>>right method here might be to set the default table type in mysql to
>>innodb before running nova-manage db sync.
>>
>>Vish
>>
>>On Oct 11, 2011, at 1:55 PM, Nick Sokolov wrote:
>>
>>> Hi stackers!
>>>
>>> I noticed, that tables in database use two database engines instead of
>>>two, but model descriptions does not override __table_args__ =
>>>{'mysql_engine': 'InnoDB'}.
>>> This is design decision or migration_repo bug, or something else?
>>>
>>> mysql> select table_name, table_type, engine FROM
>>>information_schema.tables;
>>> +---------------------------------------+-------------+--------+
>>> | table_name                            | table_type  | engine |
>>> +---------------------------------------+-------------+--------+
>>>    .... system tables here ....
>>> | agent_builds                          | BASE TABLE  | MyISAM |
>>> | auth_tokens                           | BASE TABLE  | InnoDB |
>>> | block_device_mapping                  | BASE TABLE  | MyISAM |
>>> | certificates                          | BASE TABLE  | InnoDB |
>>> | compute_nodes                         | BASE TABLE  | InnoDB |
>>> | console_pools                         | BASE TABLE  | InnoDB |
>>> | consoles                              | BASE TABLE  | InnoDB |
>>> | export_devices                        | BASE TABLE  | InnoDB |
>>> | fixed_ips                             | BASE TABLE  | InnoDB |
>>> | floating_ips                          | BASE TABLE  | InnoDB |
>>> | instance_actions                      | BASE TABLE  | InnoDB |
>>> | instance_metadata                     | BASE TABLE  | InnoDB |
>>> | instance_type_extra_specs             | BASE TABLE  | MyISAM |
>>> | instance_types                        | BASE TABLE  | InnoDB |
>>> | instances                             | BASE TABLE  | InnoDB |
>>> | iscsi_targets                         | BASE TABLE  | InnoDB |
>>> | key_pairs                             | BASE TABLE  | InnoDB |
>>> | migrate_version                       | BASE TABLE  | InnoDB |
>>> | migrations                            | BASE TABLE  | InnoDB |
>>> | networks                              | BASE TABLE  | InnoDB |
>>> | projects                              | BASE TABLE  | InnoDB |
>>> | provider_fw_rules                     | BASE TABLE  | MyISAM |
>>> | quotas                                | BASE TABLE  | InnoDB |
>>> | security_group_instance_association   | BASE TABLE  | InnoDB |
>>> | security_group_rules                  | BASE TABLE  | InnoDB |
>>> | security_groups                       | BASE TABLE  | InnoDB |
>>> | services                              | BASE TABLE  | InnoDB |
>>> | snapshots                             | BASE TABLE  | InnoDB |
>>> | user_project_association              | BASE TABLE  | InnoDB |
>>> | user_project_role_association         | BASE TABLE  | InnoDB |
>>> | user_role_association                 | BASE TABLE  | InnoDB |
>>> | users                                 | BASE TABLE  | InnoDB |
>>> | virtual_interfaces                    | BASE TABLE  | InnoDB |
>>> | virtual_storage_arrays                | BASE TABLE  | MyISAM |
>>> | volume_metadata                       | BASE TABLE  | MyISAM |
>>> | volume_type_extra_specs               | BASE TABLE  | MyISAM |
>>> | volume_types                          | BASE TABLE  | MyISAM |
>>> | volumes                               | BASE TABLE  | InnoDB |
>>> | zones                                 | BASE TABLE  | InnoDB |
>>> +---------------------------------------+-------------+--------+
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openstack
>>> Post to     : openstack at lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~openstack
>>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>_______________________________________________
>>Mailing list: https://launchpad.net/~openstack
>>Post to     : openstack at lists.launchpad.net
>>Unsubscribe : https://launchpad.net/~openstack
>>More help   : https://help.launchpad.net/ListHelp
>
> This email may include confidential information. If you received it in error, please delete it.
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>




More information about the Openstack mailing list