<?xml version="1.0"?>

<!DOCTYPE flagsdescription SYSTEM "http://www.spec.org/dtd/cpuflags2.dtd">

<flagsdescription>

<filename>HPE-Platform-Flags-AMD-V1.2-EPYC-revG</filename>

<title>SPEC CPU2006/SPEC CPU2017 Platform Settings for HPE ProLiant AMD-based systems</title>

<os_tuning>
<![CDATA[

<p><b>OS Tuning</b></p>

<p><b>ulimit</b>:</p>
<p>Used to set user limits of system-wide resources. Provides control over resources available to the shell and processes started by it. Some common ulimit commands may include:</p>
<ul>
<li><b>ulimit -s [n | unlimited]</b>: Set the stack size to <b>n</b> kbytes, or <b>unlimited</b> to allow the stack size to grow without limit.</li>
<li><b>ulimit -l (number)</b>: Set the maximum size that can be locked into memory.</li>
</ul>

<p><b>Performance Governors (Linux)</b>:</p>
<p>In-kernel CPU frequency governors are pre-configured power schemes for the CPU. The CPUfreq governors use P-states to change frequencies and lower power consumption. The dynamic governors can switch between CPU frequencies, based on CPU utilization to allow for power savings while not sacrificing performance.</p>
<p>To set the governor, use the following commmand: "cpupower frequency-set -r -g {desired_governor}"</p>

<p><b>Disabling Linux services</b>:</p>
<p>Certain Linux services may be disabled to minimize tasks that may consume CPU cycles.</p>

<p><b>irqbalance</b>:</p>
<p>Disabled through "service irqbalance stop". Depending on the workload involved, the irqbalance service reassigns various IRQ's to system CPUs. Though this service might help in some situations, disabling it can also help environments which need to minimize or eliminate latency to more quickly respond to events.</p>

<p><b>Tuning Kernel parameters</b>:</p>
<p>The following Linux Kernel parameters were tuned to better optimize performance of some areas of the system:</p>
<ul>
<li><b>dirty_background_ratio</b>: Set through "echo 40 > /proc/sys/vm/dirty_background_ratio". This setting can help Linux disk caching and performance by setting the percentage of system memory that can be filled with dirty pages.</li>
<li><b>dirty_ratio</b>: Set through "echo 8 > /proc/sys/vm/dirty_ratio". This setting is the absolute maximum amount of system memory that can be filled with dirty pages before everything must get committed to disk.</li>
<li><b>ksm/sleep_millisecs</b>: Set through "echo 200 > /sys/kernel/mm/ksm/sleep_millisecs". This setting controls how many milliseconds the ksmd (KSM daeomn) should sleep before the next scan.</li>
<li><b>khugepaged/scan_sleep_millisecs</b>: Set through "echo 50000 > /sys/kernel/mm/transparent_hugepage/khugepaged/scan_sleep_millisecs". This setting controls how many milliseconds to wait in khugepaged is there is a hugepage allocation failure to throttle the next allocation attempt.</li>
<li><b>swappiness</b>: The swappiness value can range from 1 to 100. A value of 100 will cause the kernel to swap out inactive processes frequently in favor of file system performance, resulting in large disk cache sizes. A value of 1 tells the kernel to only swap processes to disk if absolutely necessary. This can be set through a command like "echo 1 > /proc/sys/vm/swappiness"</li>
<li><b>numa_balancing</b>: Disabled through "echo 0 > /proc/sys/kernel/numa_balancing". This feature will automatically migrate data on demand so memory nodes are aligned to the local CPU that is accessing data. Depending on the workload involved, enabling this can boost the performance if the workload performs well on NUMA hardware. If the workload is statically set to balance between nodes, then this service may not provide a benefit.</li>
<li><b>Zone Reclaim Mode</b>: Zone reclaim allows the reclaiming of pages from a zone if the number of free pages falls below a watermark even if other zones still have enough pages available. Reclaiming a page can be more beneficial than taking the performance penalties that are associated with allocating a page on a remote zone, especially for NUMA machines. To tell the kernel to free local node memory rather than grabbing free memory from remote nodes, use a command like "echo 1 > /proc/sys/vm/zone_reclaim_mode"</li>
</ul>

<p><b>tuned-adm</b>:</p>
<p>The tuned-adm tool is a commandline interface for switching between different tuning profiles available to the tuned tuning daeomn available in supported Linux distros. The default configuration file is located in /etc/tuned.conf and the supported profiles can be found in /etc/tune-profiles.</p>
<p>Some profiles that may be available by default include: default, desktop-powersave, server-powersave, laptop-ac-powersave, laptop-battery-powersave, spindown-disk, throughput-performance, latency-performance, enterprise-storage</p>
<p>To set a profile, one can issue the command "tuned-adm profile (profile_name)". Here are details about relevant profiles. </p>
<ul>
<li>throughput-performance: Server profile for typical throughput tuning. This profile disables tuned and ktune power saving features, enables sysctl settings that may improve disk and network IO throughphut performance, switches to the deadline scheduler, and sets the CPU governor to performance.</li>
<li>latency-performance: Server profile for typical latency tuning. This profile disables tuned and ktune power saving features, enables the deadline IO scheduler, and sets the CPU governor to performance.</li>
<li>enterprise-storage: Server profile to high disk throughput tuning. This profile disables tuned and ktune power saving features, enables the deadline IO scheduler, enables hugepages and disables disk barriers, increases disk readahead values, and sets the CPU governor to performance</li>
</ul>

<p><b>Transparent Huge Pages (THP)</b>:</p>
<p>THP is an abstraction layer that automates most aspects of creating, managing, and using huge pages. THP is designed to hide much of the complexity in using huge pages from system administrators and developers, as normal huge pages must be assigned at boot time, can be difficult to manage manually, and often require significant changes to code in order to be used effectively. Transparent Hugepages increase the memory page size from 4 kilobytes to 2 megabytes. Transparent Hugepages provide significant performance advantages on systems with highly contended resources and large memory workloads. If memory utilization is too high or memory is badly fragmented which prevents hugepages being allocated, the kernel will assign smaller 4k pages instead. Most recent Linux OS releases have THP enabled by default.</p>

<p><b>Linux Huge Page settings</b>:</p>
<p>If you need finer control and manually set the Huge Pages you can follow the below steps:</p>
<ul>
<li>Create a mount point for the huge pages: "mkdir /mnt/hugepages"</li>
<li>The huge page file system needs to be mounted when the systems reboots. Add the following to a system boot configuration file before any services are started: "mount -t hugetlbfs nodev /mnt/hugepages"</li>
<li>Set vm/nr_hugepages=N in your /etc/sysctl.conf file where N is the maximum number of pages the system may allocate.</li>
<li>Reboot to have the changes take effect.</li>
</ul>
<p>Note that further information about huge pages may be found in your Linux documentation file: /usr/src/linux/Documentation/vm/hugetlbpage.txt</p>

<p><b>Environment Variables:</b></p>

<p><b>GOMP_CPU_AFFINITY</b>:</p>
<p>Used to bind threads to specific CPUs. The variable should contain a space-separated or comma-separated list of CPUs. This list may contain different kinds of entries: either single CPU numbers in any order, a range of CPUs (M-N) or a range with some stride (M-N:S). CPU numbers are zero based. For example, GOMP_CPU_AFFINITY="0 3 1-2 4-15:2" will bind the initial thread to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8, 10, 12, and 14 respectively and then start assigning back from the beginning of the list. GOMP_CPU_AFFINITY=0 binds all threads to CPU 0.

There is no libgomp library routine to determine whether a CPU affinity specification is in effect. As a workaround, language-specific library functions, e.g., getenv in C or GET_ENVIRONMENT_VARIABLE in Fortran, may be used to query the setting of the GOMP_CPU_AFFINITY environment variable. A defined CPU affinity on startup cannot be changed or disabled during the runtime of the application.

If both GOMP_CPU_AFFINITY and OMP_PROC_BIND are set, OMP_PROC_BIND has a higher precedence. If neither has been set and OMP_PROC_BIND is unset, or when OMP_PROC_BIND is set to FALSE, the host system will handle the assignment of threads to CPUs.</p>

<p><b>OMP_DYNAMIC</b>:</p>
<p>Dynamic adjustment of threads. Enable or disable the dynamic adjustment of the number of threads within a team. The value of this environment variable shall be TRUE or FALSE. If undefined, dynamic adjustment is disabled by default.</p>

<p><b>OMP_SCHEDULE</b>:</p>
<p>How threads are scheduled. Allows to specify schedule type and chunk size. The value of the variable shall have the form: type[,chunk] where type is one of static, dynamic or guided. The optional chunk size shall be a positive integer. If undefined, dynamic scheduling and a chunk size of 1 is used.</p>

<p><b>OMP_THREAD_LIMIT</b>:</p>
<p>Set the maximum number of threads. Specifies the number of threads to use for the whole program. The value of this variable shall be a positive integer. If undefined, the number of threads is not limited.</p>

<p><b>MALLOC_CONF</b>:</p>
<p>This environment variable affects the execution of the allocation functions. If the environment variable MALLOC_CONF is set, the characters it contains will be interpreted as options.</p>

]]>
</os_tuning>

<firmware>
<![CDATA[

<p><b>Firmware Settings</b></p>
<p>One or more of the following settings may have been set. If so, the "Platform Notes" section of the report will say so; and you can read below to find out more about what these settings mean.</p>

<p><b>AMD SMT Option (Default = Enabled):</b></p>
<p>This feature allows enabling or disabling of logical processor cores on processors supporting AMD SMT.  When enabled, each physical processor core operates as two logical processor cores. When disabled, each physical core operates as only one logical processor core. Enabling this option can improve overall performance for applications that benefit from a higher processor core count.</p>

<p><b>Thermal Configuration (Default = Optimal Cooling):</b></p>
<p>This feature allows the user to select the fan cooling solution for the system. Values for this BIOS option can be:</p>
<ul>
<li><b>Optimal Cooling</b>: Provides the most efficient solution by configuring fan speeds to the minimum required to provide adequate cooling.</li>
<li><b>Increased Cooling</b>: Will run fans at higher speeds to provide additional cooling. Increased Cooling should be selected when non-HPE storage controllers are cabled to the embedded hard drive cage, or if the system is experiencing thermal issues that cannot be resolved in another manner.</li>
<li><b>Maximum Cooling</b>: Will provide the maximum cooling available by this platform.</li>
</ul>

<p><b>Determinism Control (Default = Auto):</b></p>
<p>This option allows the user to choose between an Auto and Manual mode for Determinism Control. Values for this BIOS option can be:</p>
<ul>
<li><b>Auto</b>: The system will decide what Performance Determinism setting to use. Auto also uses the processor fused values for Determinism.</li>
<li><b>Manual</b>: Allows the user to select either Power Deterministic or Performance Deterministic as described below.</li>
</ul>

<p><b>Performance Determinism (Default = Performance Deterministic):</b></p>
<p>This option allows the user to configure the AMD processor Determinism setting for AGESA ("AMD Generic Encapsulated Software Architecture", a bootstrap protocol by which system devices on AMD64-architecture mainboards are initialized) control or BIOS control. Values for this BIOS option can be:</p>
<ul>
<li><b>Performance Deterministic</b>: This option allows for AGESA control and provides predictable (capped) performance across all processors of the same type in the system. This could cause the system to run at or report lower than expected power values.</li>
<li><b>Power Deterministic</b>: This option will not enable performance deterministic control and allows for BIOS control. This option will maximize performance with power limits defined by the system design and operate as close to the thermal design point (TDP) as possible.</li>
</ul>

<p><b>Package Power Limit Control Mode (Default = Auto):</b></p>
<p>This is a per Processor Power Limit value applicable for all populated processors in the system. This can be set to limit the processor power to a certain value. Values for this BIOS option can be:</p>
<ul>
<li><b>Auto</b>: Uses the default processor value.</li>
<li><b>Manual</b>: Lets the user set a power limit and exposes Package Power Limit value field that a user can enter a number into. If a number is entered higher than what the processor and/or system supports, the BIOS will limit the power to the max possible value..</li>
</ul>

<p><b>Memory Patrol Scrubbing (Default = Enabled):</b></p>
<p>This option allows for correction of soft memory errors. Over the length of system runtime, the risk of producing multi-bit and uncorrected errors is reduced with this option. Values for this BIOS setting can be:</p>
<ul>
<li><b>Enabled</b>: Correction of soft memory errors can occur during runtime.</li>
<li><b>Disabled</b>: Soft memory error correction is turned off during runtime.</li>
</ul>

<p><b>Processor Power and Utilization Monitoring (Default = Enabled):</b></p>
<p>This BIOS option allows the enabling/disabling of iLo Processor State Mode Switching and Insight Power Management Processor Utilization Monitoring.</p>
<p>When set to disabled, the system will also set the Power Regulator mode to Static High Performance mode and the HP Power Profile mode to Custom.  This option may be useful in some environments that require absolute minimum latency.</p>

<p><b>Workload Profile (Default = General Power Efficient Compute):</b></p>
<p>This option allows a user to choose a workload profile that best fits the user`s needs. The workload profiles control many power and performance settings that are relevant to general workload areas. Values for this BIOS option can be:</p>
<ul>
<li>General Power Efficient Compute, General Peak Frequency Compute, General Throughput Compute, Virtualization - Power Efficient, Virtualization - Max Performance, Low Latency, Mission Critical, Transaction Application Processing, High Performance Compute (HPC), Decision Support, Graphic Processing, I/O Throughput, and Custom.</li>
</ul>

<p><b>Minimum Processor Idle Power Core C-State (Default = C6 State):</b></p>
<p>This option can only be configured if the Workload Profile is set to Custom, or this option is not a dependent value for the Workload Profile. This feature selects the processor's lowest idle power state (C-state) that the operating system uses. The higher the C-state, the lower the power usage of that idle state (C6 is the lowest power idle state supported by the processor). Values for this setting can be:</p>
<ul>
<li><b>C6 State</b>: While in C6, the core PLLs are turned off, the core caches are flushed and the core state is saved to the Last Level Cache. Power Gates are used to reduce power consumption to close to zero.  C6 is considered an inactive core.</li>
<li><b>C1E State</b>: C1E is defined as the enhanced halt state.  While in C1E no instructions are being executed.  C1E considered an active core.</li>
<li><b>No C-states</b>: No C-states is defined as C0, which is defined as the active state. While in C0, instructions are being executed by the core.</li>
</ul>

<p><b>Memory Patrol Scrubbing (Default = Enabled):</b></p>
<p>This option allows for correction of soft memory errors. Over the length of system runtime, the risk of producing multi-bit and uncorrected errors is reduced with this option. Values for this BIOS setting can be:</p>
<ul>
<li><b>Enabled</b>: Correction of soft memory errors can occur during runtime.</li>
<li><b>Disabled</b>: Soft memory error correction is turned off during runtime.</li>
</ul>

<p><b>NUMA memory domains per socket (Default = Auto):</b></p>
<p>This option allows the user to divide the memory domains that each socket has into a certain number of NUMA memory domains for better memory bandwidth. Values for this BIOS setting can be:</p>
<ul>
<li><b>One memory domain per socket</b>: Each processor socket will have one memory domain.</li>
<li><b>Two memory domains per socket</b>: Each processor socket will have two memory domains.</li>
<li><b>Four memory domains per socket</b>: Each processor socket will have four memory domains.</li>
<li><b>Auto</b>: The system will default to One memory domain per socket.</li>
</ul>

<p><b>Last-Level Cache (LLC) as NUMA Node (Default = Disabled):</b></p>
<p>WHen enabled, this option allows the user to divide processor's cores into additional NUMA Nodes based on the L3 cache. Enabling this feature can increase performance for workloads that are NUMA aware and optimized. Values for this BIOS setting can be:</p>
<ul>
<li><b>Enabled</b></li>
<li><b>Disabled</b></li>
</ul>

<p><b>Last updated July 23, 2019.</b></p>
]]>
</firmware>

</flagsdescription>
