docker-images icon indicating copy to clipboard operation
docker-images copied to clipboard

Configure the Docker image with Huge Pages

Open stampes opened this issue 4 years ago • 3 comments

In the comments for https://github.com/oracle/docker-images/issues/1059 is it mentioned that you could install the huge page outside the container and the use --device for exposing these inside the container.

Would it not make sense simply to configure the Oracle Linux used by the container to use Huge pages so - independent of your Docker host - Oracle can use these huge pages in the container?

I have not a lot of experience or knowledge of the concept of Huge Pages - but one of my colleagues have tried this using the full Linux for Oracle ( adding 1 GB to the image but still ) we saw 20% performance improvements on some operations.

stampes avatar Sep 27 '21 13:09 stampes

Containers are not a virtualization technology. The kernel used by the containers is is kernel of your host, this is why you have to configure huge pages on the host.

AmedeeBulle avatar Sep 28 '21 12:09 AmedeeBulle

I guess that is under the assumption that your host is a Linux - we run this under windows. The required Oracle Linux used under WSL2 could be configured to use Huge Pages - or?

stampes avatar Sep 28 '21 18:09 stampes

If you are running Linux containers, the Docker host is always Linux -- In the case of Windows, WSL2 is actually running a Linux VM. The Linux kernel of this VM is provided by Microsoft; the user space part is from the distribution of your choice.

I am not sure to what you are referring to with "The required Oracle Linux used under WSL2" as neither the kernel nor the user space are from Oracle in this case (AFAIK Oracle does not provide a distribution for WSL2).

Bottom line, the Huge Pages (and Transparent Huge Pages) configuration is something which is done at kernel level of your Linux host (the Microsoft Linux kernel in the case of WSL2) and not something which can be done from inside a container.

AmedeeBulle avatar Sep 29 '21 07:09 AmedeeBulle