How to enable 'FileHugePages' in kernel 5.4.53?

Moderators: 666philb, Forum moderators

Post Reply
woof
Posts: 6
Joined: Wed Mar 23, 2022 11:44 am
Has thanked: 3 times

How to enable 'FileHugePages' in kernel 5.4.53?

Post by woof »

Hey all, could I get some instructions on how to enable 'FileHugePages' on puppy?

'sysctl -w vm.nr_hugepages=$(nproc)'
returns:
'sysctl: cannot stat /proc/sys/vm/nr_hugepages: No such file or directory'

'cat /sys/kernel/mm/transparent_hugepage/enabled'
returns:
'[always] madvise never'

edited '/etc/sysctl.conf' adding 'vm.nr_hugepages = 1024' but that didn't work, next I saved the same string to a file in '/etc/sysctl.d/00-local.conf', procps service is running at boot, but that didn't work either..

what am I missing? Tbh I'm not very knowledgeable about configuring this part of linux, but had no issues making it work on other distros, namely alpine and debian.
I've ran out of ideas, been looking for a fix everywhere online regarding this, specifically for puppy, to no avail so far.

kernel is '5.4.53'
Idk what other informaion might be needed to troubleshoot this.

Thanks in advance for any help or insights I could get.

Intel i5-3210M (4) @ 3.100GHz, Intel HD 4000, 8GB RAM

User avatar
mikewalsh
Moderator
Posts: 6595
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 1045 times
Been thanked: 2220 times

Re: help required to enable 'FileHugePages'

Post by mikewalsh »

@woof :- :welcome: to the "kennels".

You need the help of our kernel experts. Most of us are just ordinary users, who are simply grateful that kernels function at all.....and haven't got a clue about this stuff. Which includes me.

We do have a number of Puppy users who really understand this stuff, however, since they regularly compile new kernels for the community. These are the guys who will (hopefully!) understand what it is you're wanting to do.....

Hang in there. Someone will be along before too long.

Mike. ;)

User avatar
rockedge
Site Admin
Posts: 7160
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3241 times
Been thanked: 3047 times
Contact:

Re: help required to enable 'FileHugePages'

Post by rockedge »

@woof which kernel would you use? Perhaps I can compile a kernel on a Fossapup64 that has hugepages enabled.

I'll run a test run on a huge-5.16.14

User avatar
rockedge
Site Admin
Posts: 7160
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3241 times
Been thanked: 3047 times
Contact:

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by rockedge »

Here is 5.16.14-hugepages to test

woof
Posts: 6
Joined: Wed Mar 23, 2022 11:44 am
Has thanked: 3 times

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by woof »

Sry for the late reply, thx for the welcoming and nice to meet you @mikewalsh very nice and thoughful of you.
You absolute LEGEND! @rockedge Thanks so much, wasn't expecting an already compiled kernel, thought I would have to do it myself after checking here and trying to troubleshoot it some more, which I dont mind but your help saved me time and effort, much appreciated! I'll give it a go let you guys know how it goes..

Intel i5-3210M (4) @ 3.100GHz, Intel HD 4000, 8GB RAM

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by Phoenix »

Yeah, if its not already enabled that will require a full rebuild. And then you may or may not want to ditch the stuff left over from building. The config option is somewhere.. usually they can be looked up.

IRC: firepup | Time to hack Puppy!

woof
Posts: 6
Joined: Wed Mar 23, 2022 11:44 am
Has thanked: 3 times

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by woof »

Worked like a charm! at first tried using the 'change kernel' function inside quickpet, but neither of the two options worked for me,
in the end did it manually by adding a new grub entry pointing to the new kernel and other needed files..

just out of curiosity, is the size fixed or can it be modified without rebuilding? After rebooting with new kernel I remembered '/etc/sysctl.conf' and '/etc/sysctl.d/00-local.conf' where there like I left them (ofc because of my psave folder), but strings in those files differ from what '/proc/meminfo' reports..

Hey @Phoenix Thx for the reply :thumbup2:

In case anyone is wondering, it's a full install inside a 128gb microSD divided into 3 partitions, holding boot files separate from psave and lastly 1gb for swap

Intel i5-3210M (4) @ 3.100GHz, Intel HD 4000, 8GB RAM

User avatar
bigpup
Moderator
Posts: 7593
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 1038 times
Been thanked: 1692 times

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by bigpup »

Woof,

The problem with the change_kernels program is it will not work on a full install of Puppy Linux.
It is designed for frugal installs.

Really, Puppy is designed to work best as a frugal install.
Some features only work in a frugal install.
Frugal is just the name used for the install. It is the complete Puppy OS, just installed in a special way.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
rockedge
Site Admin
Posts: 7160
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3241 times
Been thanked: 3047 times
Contact:

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by rockedge »

@woof
Just in case, here is kernel 5.4.53-hugepages

User avatar
mikeslr
Posts: 3145
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 187 times
Been thanked: 1016 times

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by mikeslr »

With modern Puppys you have the options of creating either a SaveFile or a SaveFolder. A SaveFile, which can be anywhere, is a block of space formatted Linux. It can not be decreased but can be increased. That requires a reboot. A SaveFolder, on the other hand, can only be on a Linux formatted partition. Essentially, it's just a designated folder which can expand to the full extent of the available space of the partition it is on.
You'll find many posts detailing the many advantages of using a Frugal rather than Full install. I'll just mention two: security and ease or recovery if there's a problem. Employing a SaveFolder, the user has all the advantages offered by a Frugal install and almost all those offered by a Full install. The only justification anyone has provided for still using a Full install is when engaging in compiling, a RAM intensive activity*.

The tenor of woof's posts suggest that compiling may be among the activities envisioned. If so, may I suggest employment of a practice someone who compiles posted about. A frugal install only requires its own folder. It can exist anywhere, co-exist on the same partition as one Full install and as many Frugal installs are as you care to have: Add a frugal install to Fossapup's partition and your boot-menu/config file. For 'normal' use, boot into the Frugal; when compiling boot into the Full.

I would think such dual system could also be used to overcome one of a Full installs hazards: it's near impossibility to fix when broken. Questionable activities can be tested under the Frugal and problems over-come before applying them to the Full.

==-=-=-=-
* By extension, this concern may also apply to rendering long videos when trans-coding is required.

woof
Posts: 6
Joined: Wed Mar 23, 2022 11:44 am
Has thanked: 3 times

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by woof »

My bad guyss, perhaps I confused you when I shared details about the install layout, after I didn't specify size of what..
(I assumed we were discussing only about the thread topic), I meant the size of 'hugepages'.
As for the psave @mikeslr I messed up, it's not a 'full install', it's a 'frugal install' (again my bad '^^), I meant to say it wasn't sharing the drive with another OS. It's already using the 2nd partition as the save folder, so no issues there.. Awesome input though, been using pup for a long time, and never thought of doing something like that, will definetly give it a go, bc yes, I do wanna compile, I would like to contribute, develop for puppy and help maintain the project.
I figured as much @bigpup , after trying a few times, it's great that puppy is so flexible and I was able to load everything by modifying boot flags, thx for the input :thumbup:
Thx @rockedge for the extra compile! I'll put it next to the others to test it.
Are any of these articles relevant for compiling the kernel? I would like to learn how to do it,

https://bkhome.org/archive/puppylinux/d ... kernel.htm
https://pateo.wordpress.com/2009/12/25/ ... inux-dpup/
https://wikka.puppylinux.com/CompilingKernel ( I'm getting the feeling these might be the most up to date set of intructions )

Intel i5-3210M (4) @ 3.100GHz, Intel HD 4000, 8GB RAM

User avatar
rockedge
Site Admin
Posts: 7160
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3241 times
Been thanked: 3047 times
Contact:

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by rockedge »

@woof To get you started building kernels I would recommend the kernel-kit from the woof-CE package.

https://github.com/puppylinux-woof-CE/woof-CE

Code: Select all

git clone -b testing https://github.com/puppylinux-woof-CE/woof-CE.git
cd woof-CE
./merge2out

Follow the prompts, I select 64 bit,Ubuntu, Focal.
Then enter the directory (or what you have chosen) /woof-out_x86_64_x86_64_ubuntu_focal64/kernel-kit

modify the build.conf to fit what is to be built. AUFS numbers look here :https://github.com/sfjro/aufs5-standalone

Look under branches and chose the AUFS patches version just under the version of kernel.

So kernel 5.16+ will use aufs5.16

Once you have the build.conf set run ./build.sh
when it comes time in the process to configure the kernel, I choose #2 when running and compiling on a Bionic or Fossapup.

After some time you will see hopefully a successful completion of the compile. This is a super basic outline on how to do it. Read the docs that are included and experimentation will get you there. Eventually other patches can be introduced but that's for another time.

woof
Posts: 6
Joined: Wed Mar 23, 2022 11:44 am
Has thanked: 3 times

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by woof »

I did it! That was fun, used kernel=5.17 aufs=5.16, got some warnings but it finished compiling in the end, when testing nothing odd happened, until conection fell through when opening firefox behind a vpn, checked dmeg and it was reporting this error:

Code: Select all

[  139.869701] ath: phy0: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x02000020 DMADBG_7=0x00006100

Here's the build output:

so, I'm back to 5.16.14

Intel i5-3210M (4) @ 3.100GHz, Intel HD 4000, 8GB RAM

User avatar
rockedge
Site Admin
Posts: 7160
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3241 times
Been thanked: 3047 times
Contact:

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by rockedge »

@woof You were very close. Looks like the problem is the AUFS5.16 patches don't work on 5.17

Need to wait for the aufs5.17+ that will match up. Have you tried another one?

woof
Posts: 6
Joined: Wed Mar 23, 2022 11:44 am
Has thanked: 3 times

Re: How to enable 'FileHugePages' in kernel 5.4.53?

Post by woof »

yeah! Thats was also my conlusion but wasn't sure since I'm new to kernel compiling... no I haven't but I will rn, in order to gather more experience and get a better feel of the whole process.. I will try 5.16.17

Edit:

It went well, same warnings at compile as before, dmesg reported the same error as well but only 3 times in contrast with latest kernel, but connection is stable and packets are going through..

Until it wasnt anymore lol, just when I was about to finish editing this, had to reconnect to wifi and vpn.. apparently there is an underlying issue with the wireless device:

Code: Select all

01:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)

In conclusion, vpn tunnel doesnt work with latest 5.17, but it works with 5.16.17 although connection might be a bit unstable?

here is the build output and dmesg when using 5.16.17:

I wonder if I'm doing something inherently wrong, or maybe missing something related to the kernel configuration. In any case, I'll keep testing, and see what I can find related to this.

I think this can be marked as solved, since hugepages is already working for me, I can open another thread related to kernel compiling to keep things sorted.

Thx everyone :thumbup2:

Intel i5-3210M (4) @ 3.100GHz, Intel HD 4000, 8GB RAM

Post Reply

Return to “Fossapup64”