xmrig/scripts/enable_1gb_pages.sh

12 lines
286 B
Bash
Raw Normal View History

2024-03-20 19:13:01 +00:00
#!/bin/sh -e
2019-12-14 20:13:52 +00:00
# https://xmrig.com/docs/miner/hugepages#onegb-huge-pages
sysctl -w vm.nr_hugepages=$(nproc)
for i in $(find /sys/devices/system/node/node* -maxdepth 0 -type d);
do
echo 3 > "$i/hugepages/hugepages-1048576kB/nr_hugepages";
done
echo "1GB pages successfully enabled"