From 8fc942bb08f3c08e9609dbabf71cb24b8363c079 Mon Sep 17 00:00:00 2001 From: Cole Deck Date: Wed, 29 Jul 2020 16:25:30 -0500 Subject: [PATCH] Add samba start, fix hugepages allocation --- vm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vm b/vm index c21bdb7..cb87dfd 100755 --- a/vm +++ b/vm @@ -1,8 +1,12 @@ #!/bin/bash echo "Reserving hugepages" -echo 16 | sudo tee /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages +echo 8192 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages +echo 3 | sudo tee /proc/sys/vm/drop_caches +echo 1 | sudo tee /proc/sys/vm/compact_memory echo "Starting Network" virsh --connect=qemu:///system net-start default +sudo systemctl start smb nmb +sleep 2 echo "Starting VM" virsh --connect=qemu:///system start win10 echo "Starting Scream" @@ -28,7 +32,7 @@ done sleep 1 echo "VM is off" echo "Freeing up memory" -echo 0 | sudo tee /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages +echo 0 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages echo "Unbinding from vfio-pci" sudo unbind 0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3 sleep 1 @@ -36,5 +40,6 @@ echo "Enabling GPU power management" sudo modprobe nvidia NVreg_DynamicPowerManagement=0x02 sleep 2 sudo systemctl start bumblebeed +sudo systemctl stop smb nmb sleep 1 clrgpu