env/darwin: allocate 10GB memory to guests

Increase memory allocation from 4GB to 10GB. x/tools (and perhaps
others) tests are heavily swapping with only 4GB of memory, hurting
performance.

10GB seems to be a good tradeoff of more memory without too much risk of
swapping the host. At 12GB, QEMU was sometimes using >16GB of memory,
leaving the host at risk of swapping if both guests used lots of memory
at once.

For golang/go#59634.

Change-Id: I3d11439266aa592697ecf83926632f954c45e84f
Reviewed-on: https://go-review.googlesource.com/c/build/+/484747
Commit-Queue: Michael Pratt <mpratt@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
This commit is contained in:
Michael Pratt 2023-04-14 16:34:57 -04:00 коммит произвёл Gopher Robot
Родитель c1bc87000c
Коммит 57dc67da1c
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -50,7 +50,7 @@ func darwinCmd(base string) *exec.Cmd {
args := []string{
// Discard disk changes on exit.
"-snapshot",
"-m", "4096",
"-m", "10240",
"-cpu", "host",
"-machine", "q35",
"-usb",

2
env/darwin/aws/qemu.sh поставляемый
Просмотреть файл

@ -19,7 +19,7 @@ OVMF_CODE="$HOME/sysroot-macos-x86_64/share/qemu/edk2-x86_64-code.fd"
# These arguments should be kept in sync with cmd/runqemubuildlet/darwin.go.
args=(
-m 4096
-m 10240
-cpu host
-machine q35
-usb -device usb-kbd -device usb-tablet