-
Notifications
You must be signed in to change notification settings - Fork 1
/
boot_server
executable file
·33 lines (27 loc) · 1.19 KB
/
boot_server
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
31
32
33
#!/bin/bash
# https://github.com/rjsears/chia_plot_manager/blob/7ad9b4790a8322e24cac4763d8707e8fd0c3eb30/extras/set_cpu_to_performance.sh
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
for d in /sys/devices/system/cpu/cpu*/cpufreq; do
echo "performance" > $d/scaling_governor
#echo "1200000" > $d/scaling_min_freq
done
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
for d in $(df | grep ' /farm/sites/' | sed -E 's;^/dev/([a-z]+).*;\1;'); do
echo 'bfq' | tee /sys/block/$d/queue/scheduler
done
SWAPFILE=/farm/yards/907/swapfile
rm "${SWAPFILE}"
fallocate -l 330G "${SWAPFILE}"
chmod 600 "${SWAPFILE}"
mkswap "${SWAPFILE}"
swapon "${SWAPFILE}"
sysctl vm.swappiness=0
mount -t tmpfs -o size=330G tmpfs /farm/porches/700
#for node in 0 1; do
# mount -t tmpfs -o size=110G,mpol=bind:${node},noatime,nodiratime tmpfs /farm/porches/70${node}
# #mount -t ramfs -o size=110G,mpol=bind:${node},noatime,nodiratime ramfs /farm/porches/70${node}
# #chown -R altendky.altendky /farm/porches/70${node}
#done
mkdir -p /var/lib/prometheus/node-exporter
chown altendky.altendky /var/lib/prometheus/node-exporter
#prometheus-node-exporter --collector.textfile.directory="/tmp/metrics"