How are differently sized huge pages allocated to applications in Linux?

104 views Asked by At

I'm working with a software that runs on an Oracle backend database, which means I get to configure the database VMs infrastructure. Not my specialty, but it is what it is.

My workload is going to be processing tables spanning < 1Mb - ~10Gb (up to 1-2 billion rows with 8 fields), mostly OLAP oriented with lots of parallel reads and bulk inserts of 10k+ rows via jdbc.

I've read that huge pages are important in this context, so I am looking into setting them up; unfortunately, the recommended size and ratio of the huge pages isn't well described online. I can go for either 1 Gb or 2 Mb sized huge pages, or both. My node has 500 Gb in total for the database.

On to my question: If I prepared, e.g., 100 huge pages of size 1 Gb each and 500 huge pages of size 2 Mb each, is there a rhyme or reason for which size of huge page gets allocated when?

  1. For example, would the 1 Gb huge pages be allocated until exhaustion, and then the 2 Mb allocated?
  2. Or is there any optimization by the kernel as to which size huge page gets used first? Like maybe if the buffer size doesn't exceed the size of the huge page, it won't request it.

Honestly, I am not even sure whether it matters. Just trying to get a feel for how precise I need to be here.

OS: Oracle Linux Server 7.9

DB: Oracle 19.15 EE

0

There are 0 answers