AUTOHBW(7) | AUTOHBW | AUTOHBW(7) |
libautohbw.so - An interposer library for redirecting heap allocations
LD_PRELOAD=libautohbw.so command {arguments ...}
AutoHBW library (libautohbw.so) is an interposer library for redirecting heap allocations (malloc, calloc, realloc, valloc, posix_memalign, memlign) to high-bandwidth (HBW) memory. Consequently, AutoHBW library can be used to automatically allocate high-bandwidth memory without any modification to source code of an application.
For instance, the following command-line runs existing binary /bin/ls with AutoHBW library, automatically redirecting heap allocations (larger than a given threshold) to high-bandwidth memory.
The behavior of AutoHBW library is controlled by the following environment variables.
AUTO_HBW_SIZE=x:[y]
Indicates that any allocation larger than x and smaller than y
should be allocated in HBW memory. x and y can be followed by
a K, M, or G to indicate the size in Kilo/Memga/Giga bytes (e.g., 4K, 3M,
2G).
Examples:
AUTO_HBW_LOG=level
Sets the value of logging (printing) level. If level is:
Notes:
Examples:
AUTO_HBW_MEM_TYPE=memory_type
Sets the type of memory type that should be automatically allocated. By
default, this type is MEMKIND_HBW_PREFERRED, if MCDRAM is found in your
system; otherwise, the default is MEMKIND_DEFAULT. The names of memory types
are defined in memkind(3) man page. memory_type has to be one
of MEMKIND_DEFAULT, MEMKIND_HUGETLB, MEMKIND_INTERLEAVE, MEMKIND_HBW,
MEMKIND_HBW_PREFERRED, MEMKIND_HBW_HUGETLB,
MEMKIND_HBW_PREFERRED_HUGETLB, MEMKIND_HBW_GBTLB (DEPRECATED),
MEMKIND_HBW_PREFERRED_GBTLB (DEPRECATED), MEMKIND_GBTLB (DEPRECATED),
MEMKIND_HBW_INTERLEAVE
If you are requesting any huge TLB pages, please make sure that the requested type is currently enabled in your OS.
Examples:
AUTO_HBW_DEBUG=0|1|2
Set the debug message printing level. Default is 0. This is mainly for
development.
It is possible to temporarily disable/enable automatic HBW allocations by calling disableAutoHBW() and enableAutoHBW() in source code. To call these routines, please include autohbw_api.h header file and link with -lautohbw.
If high-bandwidth memory is not physically present in your system, the environment variable MEMKIND_HBW_NODES must be set to indicate the high-bandwidth node as indicated in memkind(3).
The following will run /bin/ls with AutoHBW library. Make sure that paths to both libautohbw.so and libmemkind.so are included in LD_LIBRARY_PATH.
To run with MPI, a shell script must be created, with the correct
LD_PRELOAD command for each rank. For example, if we put
LD_PRELOAD=libautohbw.so /bin/ls in a shell script named
autohbw_test.sh, it can be executed with 2 MPI ranks as:
Copyright (C) 2014 - 2020 Intel Corporation. All rights reserved.
2016-07-28 | Intel Corporation |