Page MenuHomePhabricator

Make a config setting that scales RAM and CPU based on host capabilities
Closed, ResolvedPublic

Description

Something like https://github.com/btopro/elmsln-vagrant/blob/master/Vagrantfile#L33-L48 which attaches all cores and 1/4 RAM to the VM

Event Timeline

bd808 raised the priority of this task from to Needs Triage.
bd808 updated the task description. (Show Details)
bd808 added a project: MediaWiki-Vagrant.
bd808 subscribed.

One suggestion on the etherpad pad was vagrant config vagrant_ram auto. This doesn't sound bad to me but I'm not sure I personally understand the surgery that would need to be done on the existing config sub-command to translate auto to a dynamic number.

dduvall subscribed.

The low memory default (1G) has been biting more people lately (see T86206). I'll be working on a patch for this today.

gerritbot subscribed.

Change 187601 had a related patch set uploaded (by Dduvall):
plugin: Support "auto" setting for vagrant_ram

https://gerrit.wikimedia.org/r/187601

Patch-For-Review

Should "auto" perhaps be the default?

Change 187601 merged by jenkins-bot:
plugin: Support "auto" setting for vagrant_ram and vagrant_cores

https://gerrit.wikimedia.org/r/187601

Should "auto" perhaps be the default?

I think I'd be fine with auto being the default, but I'm also fine with it just being documented somewhere how to use the new settings.

$ vagrant config vagrant_ram auto
$ vagrant config vagrant_cores auto
$ vagrant reload

Change 194948 had a related patch set uploaded (by Dduvall):
plugin: Support auto-configuration as a setting feature

https://gerrit.wikimedia.org/r/194948

Change 194948 merged by jenkins-bot:
plugin: Default auto-configuration of vagrant_cores

https://gerrit.wikimedia.org/r/194948

dduvall claimed this task.

Automatic configuration of vagrant_cores is performed by default. For vagrant_ram it remains explicit since roles can now make incremental adjustments to it (see T92549).