Missing index for expire_reservations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
High
|
Vish Ishaya | ||
Icehouse |
Fix Released
|
High
|
Vish Ishaya | ||
OpenStack Compute (nova) |
Fix Released
|
High
|
Vish Ishaya | ||
Icehouse |
Fix Released
|
High
|
Vish Ishaya |
Bug Description
While investigating some database performance problems, we discovered that there is no index on deleted for the reservations table. When this table gets large, the expire_reservations code will do a full table scan and take multiple seconds to complete. Because the expire runs on a periodic, it can slow down the master database significantly and cause nova or cinder to become extremely slow.
> EXPLAIN UPDATE reservations SET updated_
+----+-
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-
| 1 | SIMPLE | reservations | index | NULL | PRIMARY | 4 | NULL | 950366 | Using where; Using temporary |
+----+-
An index on (deleted, expire) would be the most efficient.
tags: | added: db |
Changed in cinder: | |
importance: | Undecided → High |
Changed in nova: | |
importance: | Undecided → High |
Changed in cinder: | |
milestone: | none → juno-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | none → juno-3 |
status: | Fix Committed → Fix Released |
tags: | removed: in-stable-icehouse |
Changed in nova: | |
milestone: | juno-3 → 2014.2 |
Changed in cinder: | |
milestone: | juno-3 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/109660
Review: https:/