Questions about huge pages

I’ve done a bit of googling and it’s apparent that Stellaris benefits from huge pages in RAM, I read the RHEL documentation page on huge pages (with a questionable level of comprehension) and I’m left with a few questions:

1: If I were to ask my system for 8 1GiB huge pages, would that reserve 8GiB permanently or only when the huge pages are used?
2: Do programs have to request a huge page or will one just be allocated by the system when a program’s memory footprint exceeds a given size? If the latter, is that configurable?
3: If I want to restrict the use of those pages to certain programs, is there an easy way to do that?
EDIT: 4: I know I can tell the kernel to always make huge pages available and that Fedora prefers madvise, when I looked at the madvise manual it seemed (to my untrained eye) like madvise needs programs to tell it what they want, is that correct? Or is there a way for me to tell it “give this program huge pages”?

First thing to do when optimising to know you have a problem to fix.
Is Sellaris running badly?

That rhel doc points says
Transparent HugePages (THP)

With THP, the kernel automatically assigns huge pages to processes, and therefore there is no need to manually reserve the static huge pages. The following are the two modes of operation in THP:

system-wide: Here, the kernel tries to assign huge pages to a process whenever it is possible to allocate the huge pages and the process is using a large contiguous virtual memory area.

Maybe just turn on THP in system wide mode and see if it helps.

I wouldn’t say that Stellaris runs badly, it just struggles as the game goes on and the number of variables increase and my reading on the subject turned up benchmarks that show huge pages help it considerably.

This helps a lot with my understanding, thanks. I’ll take that advice and see what happens.