IBM Support

Linux on x86 Large Page Allocation - Transparent Huge Pages Recommendation

Troubleshooting


Problem

Some Linux distributions of kernel versions 2.6.38 and later on x86 hardware have enabled transparent huge pages by default, when large or huge pages are enabled. IBM recommends transparent hugepages be disabled on these platforms for better performance with WebSphere Application Server

Symptom

1) Enabling HugePages with -Xlp does not increase performance or causes decreased performance for the WebSphere Application Server.

2) The system is paging even when there should be adequate real memory to support the running processes

3) The initialization stanza in the verbose garbage collection log shows the requested page size is not the page size used

Cause

When Transparent Huge Pages are enabled, the Huge Page space allocated by the SysAdmins is used to promote processes to use the huge page space. The -Xlp settings for the SDK are then ignored in some cases due to the use of the Huge Pages by the kernel resulting it there being too few HugePages to satisfy the -Xlp request.

Environment

For those Linux kernels implementing transparent huge pages as indicated by

cat /sys/kernel/mm/transparent_hugepages/enabled

[always] never

Diagnosing The Problem

For IBM SDK's with -Xlp options used to enable large page support, the verbose garbage collection log will show that the page size used is not the requested page size in the initialized stanza indicating a failure to use the large page/huge page areas


<initialized>
<attribute name="gcPolicy" value="-Xgcpolicy:gencon" />
<attribute name="maxHeapSize" value="0x60000000" />
<attribute name="initialHeapSize" value="0x32000000" />
<attribute name="compressedRefs" value="true" />
<attribute name="compressedRefsDisplacement" value="0x0" />
<attribute name="compressedRefsShift" value="0x0" />
<attribute name="pageSize" value="0x1000" />
<attribute name="requestedPageSize" value="0x20000" />
</initialized>

For Linux systems with Large Pages or Huge Pages, system paging activity may be seen when the total memory should be adequate. This is due to the large page space being reserved but not used and will be confirmed by the following:

cat /proc/meminfo | grep -i hugepage will return unexpected values for number of hugepages in use

and

cat /sys/kernel/mm/transparent_hugepages/enabled will return

[always] never

The [always] means transparent hugepages are enabled while

always [never]

means transparent hugepages are not enabled.

Resolving The Problem

The problem is resolved by either of the following:


1) Append transparent_hugepage=never to the kernel boot line in /etc/grub.conf and reboot the server


2) Edit /etc/rc.local and add these stanzas
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi

This will require root access and a reboot. If you need assistance with implementing either resolution please work with your Linux Administrator and/or your Linux Support team.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java SDK","Platform":[{"code":"PF016","label":"Linux"}],"Version":"8.5.5;8.5;8.0;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21664088