specifying in the kernel command line
Hello, I have an x86_64 host with 4GB of Physical RAM running Fedora 25. I have a question about hugepages allocation on this host. In: https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt I see that you can use "hugepages=N" kernel parameter (in grub) for specifying the number of hugepages you want to allocate at boot time. The default hugepage size on this host is 2MB. For example, I am thinking of using hugepagesz=2MB hugepages=4096 in the kernel command line. So my question is: How it the number of hugepages related to the physical memory ? or more specifically, I want to allocate 4096 2MB pages on this host which has 4 GB physical RAM. Is it possible at all ? because 4096*2 gives 8192MB, which is about 8GB, and if it is about the full size of the physical memory on this host. I doubt whether the host can boot at all with such a command line ? Or is this calculation is not related to the physical memory but to virtual memory ? Regards, Kevin
On Wed, 04 Apr 2018 11:46:01 +0300, Kevin Wilson said:
Hello, I have an x86_64 host with 4GB of Physical RAM running Fedora 25.
I have a question about hugepages allocation on this host. In: https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt
I see that you can use "hugepages=N" kernel parameter (in grub) for specifying the number of hugepages you want to allocate at boot time.
First off, have you considered transparent hugepages, where the kernel will auto-coalesce memory allocation of contiguous pages into a hugepage?
The default hugepage size on this host is 2MB.
For example, I am thinking of using hugepagesz=2MB hugepages=4096 in the kernel command line.
Why? What are you hoping to accomplish? (Hint: Figure out why the default page size is only 4K rather than 2M - how much I/O do you need to do per page fault if you have a 2M pagesize) Do you have a workload that has a good chance of performing better with hugepages?
participants (2)
-
Kevin Wilson -
valdis.kletnieks@vt.edu