summaryrefslogtreecommitdiff
path: root/old/lindy/vm/vmconf.sh
blob: c5dfd7fe9f4d01e4ed1c5ff40aaf1eb4f2204907 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

set -x

grep AnonHugePages /proc/meminfo

sudo systemctl set-property --runtime -- user.slice AllowedCPUs=4-7
sudo systemctl set-property --runtime -- user-1000.slice AllowedCPUs=4-7
sudo systemctl set-property --runtime -- system.slice AllowedCPUs=4-7
sudo systemctl set-property --runtime -- systemd-getty.slice AllowedCPUs=4-7
sudo systemctl set-property --runtime -- init.scope AllowedCPUs=4-7

sudo echo f0 | sudo tee /sys/bus/workqueue/devices/writeback/cpumask

MAX=4
for i in $(seq $MAX); do
	echo "== $i/$MAX =="
	echo 3 | sudo tee /proc/sys/vm/drop_caches
	echo 1 | sudo tee /proc/sys/vm/compact_memory
	sleep 5
	sudo virsh allocpages 2M 3072
	grep AnonHugePages /proc/meminfo
done

sudo virsh start win10

systemctl --user restart scream-client

grep AnonHugePages /proc/meminfo