Commit e8bfadf
authored
(8/5) Reduce VMM reservation contention (#7533)
#7498 was introduced to
benchmark the cost of concurrent instance provisioning, and it
demonstrated that through contention, performance can be significantly
on the VMM reservation pathway.
This PR optimizes that pathway, by removing the VMM reservation
transaction, and instead replacing it with some non-transactional
queries:
1. First, we query to see if the VMM reservation has already succeeded
(for idempotency)
2. Next, we query for all viable sled targets and affinity information
(`sled_find_targets_query`)
3. After parsing that data and picking a sled, we call
`sled_insert_resource_query` to INSERT a desired VMM record, and to
re-validate our constraints.
This change significantly improves performance in the `vmm-reservation`
benchmark, while upholding the necessary constraints implicit to VMM
provisioning.1 parent 0abc01f commit e8bfadf
File tree
8 files changed
+1067
-842
lines changed- nexus/db-queries
- src/db
- datastore
- queries
- tests/output
8 files changed
+1067
-842
lines changedLarge diffs are not rendered by default.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments