slow db due to huge instance_actions tables

Bug #2063342 reported by Max
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Unassigned

Bug Description

Description
===========
In a large environment the instance_actions and instance_actions_events tables for not deleted instances can grow infinitely.
For example when doing many migrations/live-migrations the events will sum up.
Every migration produces one action with ~10 events.

Huge tables in combination with the api autojoins can produce slow queries.

Keeping migration events for one month is usually enough.

The patch in the attachment proposes a clean_events option for the nova-manage command.

Steps to reproduce
==================
Have many VMs and instance actions e.g. live-migrations

Expected result
===============
fast api & db queries

Actual result
=============
slow api & overloaded db due to many entries in instance_actions and
instance_actions_events - normmallymax_statement_time

Environment
===========
nova zed
Regulary updating all hypervisors -> which means migrate VMs away
-> instance-actions/-events tables grow

Revision history for this message
Max (maxlamprecht) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/916927

Changed in nova:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.