Workloads Performance & Optimizations
- 32 -
5.2.2 Memory Settings and Memory Allocators
It is recommended that memory allocators be configured to use large pages
(as example THP - the Linux Transparent Huge Pages), while correctly
configuring them to (1) save on memory use, and (2) avoid memory
fragmentation. For example, if the application was pre-compiled with the
default libc allocator or with jemalloc, or links to one of them using the OS
dynamic linker, please use the following guidelines:
1. For jemalloc, ensure THP operation is maintained by running the command:
Figure 5-1. Performance Data Collection
2. For libc, the following environment variables may be useful to increase
memory allocation size by the application, and to reduce virtualization
overheads:
Figure 5-2. Performance Data Collection
5.2.3 Application Settings
Application parallelism or concurrency yields great benefits with Ultrastar
memory drive. Make sure your application is configured to use many threads
in order to process data, where available. CPU over-subscription increases the
throughput of Ultrastar memory drive.
# ln -sf ‘lg_dirty_mult:-1’ /etc/malloc.conf
# export MALLOC_TOP_PAD_=$((16777216))
# export MALLOC_TRIM_THRESHOLD_=$((16777216))