← Back to issue list

Provide a way to set Multipass CPU and memory

View original Github issue

Metadata

Project
craft-providers
Number
#531
Type
issue
State
open
Author
mr-cal
Labels
Type: Enhancement
Created
Updated
Closed
—

Current evaluation

Enhancement request to make Multipass CPU and memory configurable instead of hardcoded 2 CPU/2GB, which currently causes slow or failed builds.

Suggested action: keep open

Reason: Valid, clearly scoped enhancement with maintainer backing to address hardcoded resource limits that bottleneck build performance. Implementation follows existing provider configuration patterns and has a defined design approach.

Evaluated by: mr-cal-bot

Impact: 60 Quick Win: 34 Complexity: 30 Confidence: 85 Actionability: 80

Issue body

### What needs to get done Provide a way for applications to define the CPU and memory for a Multipass instance. The number of CPUs could be set by craft-application based on `CRAFT_MAX_BUILD_COUNT` and `CRAFT_MAX_PARALLEL_BUILD_COUNT`. Alternatively, a user could define it with something like `snap set snapcraft provider.cpus = <num cpus>` and craft-application would pass this value to craft-providers. I'm not sure how this will get passed to craft-providers, but it will probably be similar to how https://github.com/canonical/craft-providers/issues/191 will pass data about `mknod` needing to be enabled. Source: https://github.com/canonical/craft-providers/issues/212 ### Why it needs to get done Craft-providers [hardcodes](https://github.com/canonical/craft-providers/blob/35bd3c49f3860a74f7f1f424873908581654d968/craft_providers/multipass/multipass_provider.py#L109) Multipass instances to 2 CPU cores and 2GB memory. This make builds slow (or impossible).

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b
Impact: 60
Quick Win: 34
Complexity: 30
Confidence: 85
Actionability: 80
keep open Enhancement request to make Multipass CPU and memory configurable instead of hardcoded 2 CPU/2GB, which currently causes slow or failed builds.
stealth/space-bunny-alpha
Impact: 58
Quick Win: 16
Complexity: 56
Confidence: 94
Actionability: 64
keep open MultipassProvider still hardcodes 2 CPUs and 2 GB; configurability remains an open enhancement, with the configuration interface and resource safeguards still unsettled.
stealth/space-bunny-alpha
Impact: 60
Quick Win: 20
Complexity: 52
Confidence: 92
Actionability: 68
keep open Open enhancement to make Multipass CPU and memory configurable; the provider still hardcodes 2 CPUs and 2 GB, which can make builds slow or impossible.
qwen3.6-35b-a3b-mtp-q6
Impact: 45
Quick Win: 34
Staleness: 70
Complexity: 25
Confidence: 75
Support Request: 0
keep open Enhancement request to allow configuring CPU and memory for Multipass instances in craft-providers. Open for 2.5 years with no implementation or assignee.
qwen/qwen3.6-35b-a3b
Staleness: 80
Complexity: 40
Confidence: 70
Support Request: 10
needs triage Enhancement request to configure CPU and memory for Multipass instances. Currently hardcoded, causing slow builds. Open for over two years with no maintainer triage, labels, or assignee.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 45
Confidence: 80
Support Request: 10
keep open Feature request to allow configuring CPU and memory for Multipass instances to resolve hardcoded low-resource limits causing slow builds. Currently tracked with maintainer discussion but no active implementation.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#2365 (confidence 80%)

    Related snapcraft issue discussing default CPU value changes for Multipass instances.

Related issues

Issue Project State Summary Similarity
#2365 multipass: change default CPU value snapcraft merged Merged PR #2365 as c325c62ad, setting a conservative Multipass CPU default aligned with memory allocation and adding messages when resource values are overridden.
71%