[2.5, websockets, performance] Loading network related page, such as 'interfaces' or 'add device' takes too long
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Björn Tillenius | ||
2.5 |
Fix Released
|
Critical
|
Björn Tillenius |
Bug Description
Attempting to load the 'interfaces' tab of multiple controllers/
I've noticed that 'add device' takes at least 30s, which is a crazy amount of time. The similarities here is that both places access the network model and this is an area that takes very long.
There are two things that cause the slow down.
1) The subnet.list websocket handler gets slow when
a lot of IPs are observed
2) We keep adding StaticIPAddresses with a NULL ip
for some interfaces, causing them to have more
than 10 000 records each.
This bug is specifically to fix 1) and to make sure things work
correctly even due to 2).
I've filed bug 1817056 to track 2), which also should be backported
to 2.5.
Related branches
- Björn Tillenius: Approve
-
Diff: 328 lines (+179/-18)5 files modifiedsrc/maasserver/models/subnet.py (+59/-7)
src/maasserver/models/tests/test_subnet.py (+91/-0)
src/maasserver/websockets/handlers/subnet.py (+6/-6)
src/maasserver/websockets/handlers/tests/test_subnet.py (+22/-5)
src/maastesting/djangotestcase.py (+1/-0)
- Mike Pontillo (community): Approve
- MAAS Lander: Approve
-
Diff: 328 lines (+179/-18)5 files modifiedsrc/maasserver/models/subnet.py (+59/-7)
src/maasserver/models/tests/test_subnet.py (+91/-0)
src/maasserver/websockets/handlers/subnet.py (+6/-6)
src/maasserver/websockets/handlers/tests/test_subnet.py (+22/-5)
src/maastesting/djangotestcase.py (+1/-0)
Changed in maas: | |
importance: | Undecided → Critical |
status: | New → Triaged |
milestone: | none → 2.5.2 |
assignee: | nobody → Lee Trager (ltrager) |
tags: | added: performance track |
Changed in maas: | |
assignee: | Lee Trager (ltrager) → Björn Tillenius (bjornt) |
Changed in maas: | |
status: | Triaged → In Progress |
description: | updated |
Changed in maas: | |
milestone: | 2.5.2 → 2.6.0 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 2.6.0 → 2.6.0alpha1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
I've been looking through a tcpdump of the websocket traffic when loading the Devices page. Most websocket requests return quickly, but one of them, "subnet.list", took a minute to return 4kb of data.
Tomorrow I'm going to do a few more dumps to see whether that one always takes a long time, or whether it was just a coincidence that it took so long.