enable Hugepage 1GB xrig help

Get help with XFCE specific problems
Post Reply
henrykfrp
White ninja
White ninja
Posts: 10
Joined: 01 Oct 2021, 22:08
Distribution: Porteus LXDE, Devuan

enable Hugepage 1GB xrig help

Post#1 by henrykfrp » 15 Oct 2021, 14:31

hi guys is there a way to activate xmrig hugepage 1gb ? any help or idea please.

i found this but im not sure

also this instructions
https://github.com/xmrig/xmrig/issues/1411

https://github.com/xmrig/xmrig/blob/dev ... b_pages.sh

Code: Select all

#!/bin/bash -e

# 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"
Last edited by henrykfrp on 15 Oct 2021, 15:14, edited 1 time in total.

henrykfrp
White ninja
White ninja
Posts: 10
Joined: 01 Oct 2021, 22:08
Distribution: Porteus LXDE, Devuan

enable Hugepage 1GB xrig help

Post#2 by henrykfrp » 15 Oct 2021, 15:07

i also found this but dont know where on pendrive i should write this so it alway activate on boot any help. I alway run the porteus live from a pendrive no persistes ever

fulalas
DEV Team
DEV Team
Posts: 1779
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

enable Hugepage 1GB xrig help

Post#3 by fulalas » 16 Oct 2021, 00:48

So you want to execute this script every time you boot?

henrykfrp
White ninja
White ninja
Posts: 10
Joined: 01 Oct 2021, 22:08
Distribution: Porteus LXDE, Devuan

enable Hugepage 1GB xrig help

Post#4 by henrykfrp » 16 Oct 2021, 04:27

well yes that what it explain in the pages but not sure where can i execute this command on boot or on what conf file i should copied it . Any Idea?

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3265
Joined: 20 Mar 2012, 03:42
Distribution: 5.0-current-64bit
Location: australia
Contact:

enable Hugepage 1GB xrig help

Post#5 by ncmprhnsbl » 16 Oct 2021, 07:33

several way to do this: (in no particular order)
1. cheatcode: edit the APPEND line(of your chosen boot option) of /boot/syslinux/porteus.cfg with cliexe=/path/to/script.sh eg. /dev/sdb1/porteus/scripts/script.sh (name it whatever you want and make sure it's executable( chmod +x script.sh) on POSIX)

2.make a module:

Code: Select all

(as root):
mkdir -p /tmp/mod/{etc/rc.d,usr/local/bin}
cp script.sh /tmp/mod/usr/local/bin
chmod +x /tmp/mod/usr/local/bin/script.sh
echo "/usr/local/bin/script.sh" >> /tmp/mod/etc/rc.d/rc.local
dir2xzm /tmp/mod /tmp/xmrig_hugepage.xzm
mv  /tmp/xmrig_hugepage.xzm /to/your/device/porteus/modules/
3. if your usb install is POSIX(ext*) not fat or ntfs you can use rootcopy:

Code: Select all

(as root)
mkdir -p /path/to/your/usb/porteus/rootcopy/{etc/rc.d,usr/local/bin}
cp script.sh /path/to/your/usb/porteus/rootcopy/usr/local/bin
chmod +x /path/to/your/usb/porteus/rootcopy/usr/local/bin/script.sh
echo "/usr/local/bin/script.sh" >> /path/to/your/usb/porteus/rootcopyetc/rc.d/rc.local
presuming that this is early enough in the boot process .. and that the kernel is built with this capability ...
just skimming your link:
would simply adding boot parameters: hugepagesz=1GB default_hugepagesz=1GB hugepages=6 to the APPEND line work?
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

henrykfrp
White ninja
White ninja
Posts: 10
Joined: 01 Oct 2021, 22:08
Distribution: Porteus LXDE, Devuan

enable Hugepage 1GB xrig help

Post#6 by henrykfrp » 18 Oct 2021, 02:30

thank you i will check it out and let you know

henrykfrp
White ninja
White ninja
Posts: 10
Joined: 01 Oct 2021, 22:08
Distribution: Porteus LXDE, Devuan

enable Hugepage 1GB xrig help

Post#7 by henrykfrp » 18 Oct 2021, 06:57

i made the module but it convet it but doent run. i made the script called hugepagescript.sh and made it exec but when i try to run it it say:

sysctl: cannot stat /proc/sys/vm/nr_hugepages: No such file or directory

i think code is note made for porteus so it missing folder i think im not sure how can i check if indeed porteus has the hugepage or command since sysctl doent exist

Post Reply