Listing images is slow if you have many images in a busy MAAS

Bug #2091001 reported by Björn Tillenius
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Committed
High
Stamatis Katsaounis
3.5
Fix Released
High
Stamatis Katsaounis

Bug Description

If you have many images, like around 30, and also have a quite busy MAAS that produce a lot of entries in the events table, listing images will be slow, both in the UI and in the API.

The reason is that for each image, we get the last deployment time by looking at the events table. We only get the latest event for each image, but the SQL query fetches all the events that are referring to deployments of each image.

As an example, with around 30 images, it takes around 40 seconds to list the images using the boot-resources API endpoint, and postgres is using close to 100% CPU during that time.

This is with MAAS 3.5.1, but it should affect the upcoming 3.6.0 release as well.

Related branches

description: updated
Changed in maas:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Stamatis Katsaounis (skatsaounis)
milestone: none → 3.6.0
Changed in maas:
status: In Progress → Fix Committed
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.