about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-04-22T13·53+0300
committerclbot <clbot@tvl.fyi>2024-04-22T21·15+0000
commitdc444e55dcb75a634bce94fef9e29d90ea90fe5f (patch)
treedaff08d9cb182d361c704efed1c9a3992fe25891 /tvix
parentff9e8743f6572bc44c084e49adc13bf293016295 (diff)
feat(tvix/boot): default CH_NUM_CPUS=2, and set num_queues= to it r/7992
See https://patchwork.kernel.org/project/qemu-devel/patch/20200706135650.438362-5-stefanha@redhat.com/

Change-Id: I3ba9a1c1f8b0be27f215da6b71cd3a0ded513a75
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11502
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix')
-rw-r--r--tvix/boot/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/tvix/boot/default.nix b/tvix/boot/default.nix
index 0f2edc30855b..85995ffbf2c5 100644
--- a/tvix/boot/default.nix
+++ b/tvix/boot/default.nix
@@ -67,7 +67,7 @@ rec {
   # Start a `tvix-store` virtiofs daemon from $PATH, then a cloud-hypervisor
   # pointed to it.
   # Supports the following env vars (and defaults)
-  # CH_NUM_CPUS=1
+  # CH_NUM_CPUS=2
   # CH_MEM_SIZE=512M
   # CH_CMDLINE=""
   runVM = pkgs.writers.writeBashBin "run-tvix-vm" ''
@@ -89,7 +89,7 @@ rec {
     # Wait for the socket to exist.
     until [ -e $tempdir/tvix.sock ]; do sleep 0.1; done
 
-    CH_NUM_CPUS="''${CH_NUM_CPUS:-1}"
+    CH_NUM_CPUS="''${CH_NUM_CPUS:-2}"
     CH_MEM_SIZE="''${CH_MEM_SIZE:-512M}"
     CH_CMDLINE="''${CH_CMDLINE:-}"
 
@@ -102,7 +102,7 @@ rec {
      --kernel ${kernel.dev}/vmlinux \
      --initramfs ${initrd} \
      --cmdline "console=ttyS0 $CH_CMDLINE" \
-     --fs tag=tvix,socket=$tempdir/tvix.sock,num_queues=1,queue_size=512
+     --fs tag=tvix,socket=$tempdir/tvix.sock,num_queues=''${CH_NUM_CPU},queue_size=512
   '';
 
   meta.ci.targets = [