- Infos im HLRS Wiki sind nicht rechtsverbindlich und ohne Gewähr -
- Information contained in the HLRS Wiki is not legally binding and HLRS is not responsible for any damages that might result from its use -

HugePages: Difference between revisions

From HLRS Platforms
Jump to navigationJump to search
Line 5: Line 5:


== How to use HugePages? ==
== How to use HugePages? ==
The following hugepages are available on hazelhen:
The following modules for HugePages are available on hazelhen:
  craype-hugepages2M    craype-hugepages32M  craype-hugepages512M
  craype-hugepages2M    craype-hugepages32M  craype-hugepages512M
  craype-hugepages4M    craype-hugepages64M     
  craype-hugepages4M    craype-hugepages64M     
  craype-hugepages8M    craype-hugepages128M  
  craype-hugepages8M    craype-hugepages128M  
  craype-hugepages16M  craype-hugepages256M  
  craype-hugepages16M  craype-hugepages256M  
There are more modules available on the system, but these will not work for hazelhen.
 


If you want to use HugePages you have to do both of the steps below if you compile yourself.


=== Self compiled applications ===
=== Self compiled applications ===
If you want to use HugePages with an application you compile yourself, you have to do both of the steps below if you compile yourself:
* During Compilation  
* During Compilation  
**one of the craype-hugepages<size> (i.e. craype-hugepages16M) modules has to be loaded.
**one of the craype-hugepages<size> (i.e. craype-hugepages16M) modules has to be loaded.
Line 24: Line 25:


=== precompiled, dynamically linked applications ===
=== precompiled, dynamically linked applications ===
If you want to use HugePages with your precompiled application which is dynamically linked (i.e. ISV codes) you can use the LD_PRELOAD environment variable.
Therefore you have to set the following environment variables in your batch script.
export LD_PRELOAD=/usr/lib64/libhugetlbfs.so
export HUGETLB_DEFAULT_PAGE_SIZE=8M      # The size can bevaried
export HUGETLB_MORECORE_HEAPBASE=10000000000
export HUGETLB_MORECORE=yes
export HUGETLB_ELFMAP=W
export HUGETLB_FORCE_ELFMAP=yes+
If you want to use Hugepages only on a specific binary, i.e. because you are using a lot of system applications like ls, cp, etc. in your script you can set the variable below to use HugePages on specified binary only.
export HUGETLB_RESTRICT_EXE=a.out       
If you want to check if your application really uses hugepages you can set:
export HUGETLB_VERBOSE=99
export HUGETLB_DEBUG=yes

Revision as of 16:13, 9 December 2015

What are HugePages?

For an introduction for HugePages check [[ https://en.wikipedia.org/wiki/Page_%28computer_memory%29#Huge_pages |HugePage@Wiki ]]

Why use HugePages?

How to use HugePages?

The following modules for HugePages are available on hazelhen:

craype-hugepages2M    craype-hugepages32M   craype-hugepages512M
craype-hugepages4M    craype-hugepages64M     
craype-hugepages8M    craype-hugepages128M 
craype-hugepages16M   craype-hugepages256M 

There are more modules available on the system, but these will not work for hazelhen.


Self compiled applications

If you want to use HugePages with an application you compile yourself, you have to do both of the steps below if you compile yourself:

  • During Compilation
    • one of the craype-hugepages<size> (i.e. craype-hugepages16M) modules has to be loaded.
    • This will link the hugepages library to your application.
  • During runtime
    • Load the craype-hugepages<size> module with the pagesize you want to use.
    • The size chosen during runtime is completely independent from the size you have chosen during compilation.
    • Therefore you can compile once and test different sizes during runtime without changing the binary.

precompiled, dynamically linked applications

If you want to use HugePages with your precompiled application which is dynamically linked (i.e. ISV codes) you can use the LD_PRELOAD environment variable. Therefore you have to set the following environment variables in your batch script.

export LD_PRELOAD=/usr/lib64/libhugetlbfs.so
export HUGETLB_DEFAULT_PAGE_SIZE=8M      # The size can bevaried
export HUGETLB_MORECORE_HEAPBASE=10000000000
export HUGETLB_MORECORE=yes
export HUGETLB_ELFMAP=W
export HUGETLB_FORCE_ELFMAP=yes+

If you want to use Hugepages only on a specific binary, i.e. because you are using a lot of system applications like ls, cp, etc. in your script you can set the variable below to use HugePages on specified binary only.

export HUGETLB_RESTRICT_EXE=a.out        


If you want to check if your application really uses hugepages you can set:

export HUGETLB_VERBOSE=99
export HUGETLB_DEBUG=yes