Deferred writing and ultra-large memory configuration
Transparent Huge Pages (THP) is a Linux® memory management system that reduces the overhead of Translation Lookaside Buffer (TLB) lookups on machines with large amounts of memory by using larger memory pages.
If you are using ultra-large main memory configurations and deferred writing (Safer Payments UI / Administration / System Configuration / Deferred Writing) on Linux operating systems, you might experience faster restarts and more stable latencies when disabling transparent huge pages. Transparent huge pages might block the memory for seconds, when it is defragmenting the RAM. In this time, it is not possible to make even small memory allocations.
Be careful with this setting. It can also result in slower overall message computation, when deferred writing is disabled.
To disable transparent huge pages temporarily, run the following command:
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
Next restart Safer Payments. To check, if transparent huge pages are disabled run the following command:
cat /sys/kernel/mm/transparent_hugepage/enabled
The output is:
always madvise [never]
In RHEL 7, you can disable transparent huge pages
with the command tuned. See https://access.redhat.com/solutions/1320153 for details.
You can query the current active profile with:
# tuned-adm active
Current active profile: latency-performance
To create a customized profile, create a new directory in the /etc/tuned directory with the wanted profile name.
# mkdir /etc/tuned/myprofile-nothp
Next, create a
new tuned.conf file for myprofile-nothp
,
and insert the new tuning information.
# cat /etc/tuned/myprofile-nothp/tuned.conf
[main]
include= latency-performance
[vm]
transparent_hugepages=never
Next, make the script executable:
# chmod +x /etc/tuned/myprofile-nothp/tuned.conf
Next, enable myprofile:
# tuned-adm profile myprofile-nothp
This
change immediately takes effect and persists a reboot.