<?xml version="1.0"?>
<!DOCTYPE flagsdescription SYSTEM "http://www.spec.org/dtd/cpuflags2.dtd">

<flagsdescription>

<!--
######################################################################################################
       This platform flags file is supplied as an example. Please document bios/firmware settings in your
       systems that are set to non-default values for performance runs.  

       You MUST change the filename tag just below; at the very least, change "Invalid" to your company name.
######################################################################################################
-->

<filename>xFusion-Platform-Settings-AMD-V1.6.xml</filename>

<title>SPEC CPU2017 Platform Settings for xFusion Systems</title>

<os_tuning>
<![CDATA[
<dl>

<dt><b>ulimit -s &lt;n&gt;:</b></dt> 
 <dd>
  Sets the stack size to n kbytes, or unlimited to allow the stack size to grow without limit.
</dd>

<dt><b>drop_caches:</b></dt> 
 <dd>
  Writing to this will cause the kernel to drop clean caches, as well as reclaimable slab objects like dentries and inodes. Once dropped, their memory becomes free.
<ul>
      <li> To free pagecache: echo 1 > /proc/sys/vm/drop_caches</li>      

      <li> To free reclaimable slab objects (includes dentries and inodes): echo 2 > /proc/sys/vm/drop_caches</li>

      <li> To free slab objects and pagecache: echo 3 > /proc/sys/vm/drop_caches</li>
  </ul>
</dd>

<dt><b>cpupower:</b></dt> 
 <dd>
  The OS 'cpupower' utility is used to change CPU power governors settings. Available settings are: 
  <ul>
      <li> Performance: Run the CPU at the maximum frequency.</li>      

      <li> powersave(default): Run the CPU at the minimum frequency.</li>

      <li> ondemand: Scales the frequency dynamically according to current load. Jumps to the highest frequency and then possibly back off as the idle time increases.</li>
  </ul>
</dd>

<dt><b>SCALING_GOVERNOR:</b></dt>
    <dd>
    <p>Setting this environment variable to "performance" to enable cores to run at performance mode. </p>
	<p>"scaling_governor" is a configuration file in Linux's "cpufreq" model. There are five mode in "scaling_governor" which are performance, powersave, userspace, ondemand, and conservative. </p>
	<ul>
		<li>  Performance: Lock the CPU's frequency at top speed without adjusting dynamically,which may require additional power; </li>
		<li>  Powersave: CPU will work at the minimum frequency; </li>
		<li>  Userspace: Provides the corresponding interface for the user-mode application program to adjust the frequency of CPU; </li>
		<li>  Ondemand: Quick dynamic adjustment of CPU frequency on demand, and will reach the maximum frequency; </li>
		<li>  Conservative: Frequency will be adjusted on demand. </li>
	</ul>
	<p>We use "cpupower frequency-set -g performance" to set this environment variable to "performance".</p>
    </dd>

<dt><b>Transparent Hugepages (THP)</b></dt>
  <dd>
    THP is an abstraction layer that automates most aspects of creating, managing,
    and using huge pages. It is designed to hide much of the complexity in using
    huge pages from system administrators and developers.  Huge pages
    increase the memory page size from 4 kilobytes to 2 megabytes. This provides
    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.<br />
    THP usage is controlled by the sysfs setting <tt>/sys/kernel/mm/transparent_hugepage/enabled</tt>.
    Possible values:
    <ul>
      <li>never: entirely disable THP usage.</li>
      <li>madvise: enable THP usage only inside regions marked MADV_HUGEPAGE using madvise(3).</li>
      <li>always: enable THP usage system-wide. This is the default.</li>
    </ul>
    THP creation is controlled by the sysfs setting <tt>/sys/kernel/mm/transparent_hugepage/defrag</tt>.
    Possible values:
    <ul>
      <li>never: if no THP are available to satisfy a request, do not attempt to make any.</li>
      <li>defer: an allocation requesting THP when none are available get normal pages while requesting THP creation in the background.</li>
      <li>defer+madvise: acts like "always", but only for allocations in regions marked MADV_HUGEPAGE using madvise(3); for all other regions it's like "defer".</li>
      <li>madvise: acts like "always", but only for allocations in regions marked MADV_HUGEPAGE using madvise(3).  This is the default.</li>
      <li>always: an allocation requesting THP when none are available will stall until some are made.</li>
    </ul>
    An application that "always" requests THP often can benefit from waiting for an allocation until those huge pages can be assembled.<br/>
    For more information see the <a href="https://www.kernel.org/doc/Documentation/vm/transhuge.txt">Linux transparent hugepage documentation</a>.
  </dd>

<dt><b>tuned-adm:</b></dt>
     <dd>
     <p>A commandline interface for switching between different tuning profiles available in supported Linux distributions. The distribution provided profiles are located in /usr/lib/tuned and the user defined profiles in /etc/tuned. To set a profile, one can issue the command "tuned-adm profile (profile_name)". Below are details about some relevant profiles.</p>
	 <ul>
	 <li> tuned-adm command line utility allows user to switch between user definable tuning profiles.[active, profile (name), off]</li>
	 <li> throughput-performance: For typical throughput performance tuning. Disables power saving mechanisms and enables sysctl settings that improve the throughput performance of disk and network I/O. CPU governor is set to performance and CPU energy performance bias is set to performance. Disk readahead values are increased; </li>
	 <li> latency-performance: For low latency performance tuning. Disables power saving mechanisms. CPU governor is set to performance and locked to the low C states. CPU energy performance bias to performance;</li>
	 <li> balanced: Default profile provides balanced power saving and performance. It enables CPU and disk plugins of tuned and makes the conservative governor is active and also sets the CPU energy performance bias to normal. It also enables power saving on audio and graphics card; </li>
	 <li> powersave: Maximal power saving for whole system. It sets the CPU governor to ondemand governor and energy performance bias to powersave. It also enable power saving on USB, SATA, audio and graphics card; </li>
	 </ul>
	 <p>We use "tuned-adm profile throughput-performance" to set this environment variable to "throughput-performance".</p>
     </dd>
	 
<dt><b>kernel.randomize_va_space</b> (ASLR):</dt>
  <dd>
    This setting can be used to select the type of process address space randomization. 
    Defaults differ based on whether the architecture supports ASLR, whether the kernel 
    was built with the CONFIG_COMPAT_BRK option or not, or the kernel boot options used.<br />
    Possible settings:
    <ul>
      <li>0: Turn process address space randomization off.</li>
      <li>1: Randomize addresses of mmap base, stack, and VDSO pages.</li>
      <li>2: Additionally randomize the heap. (This is probably the default.)</li>
    </ul>
    Disabling ASLR can make process execution more deterministic and runtimes more consistent.
    For more information see the <tt>randomize_va_space</tt> entry in the
    <a href="https://www.kernel.org/doc/Documentation/sysctl/kernel.txt">Linux sysctl documentation</a>.
  </dd>	

<dt><b>dirty_ratio:</b></dt> 
 <dd>
  A percentage value. When this percentage of total system memory is modified, the system begins writing the modifications to disk with the pdflush operation. The default value is 20 percent. 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". This can be set through a command "echo 8 > /proc/sys/vm/dirty_ratio".
 </dd>
 
<dt><b>nohz_full:</b></dt> 
 <dd>
  The nohz_full parameter treats the timer ticks of a list of specified CPUs differently. The setting is:
  <ul>
	  <li>nohz_full=cpulist: If the CPU is specified as a nohz_full CPU and there is only one runnable task on the CPU, then the kernel stops sending timer ticks to that CPU. As a result, more time may be spent running the application and less time spent servicing interrupts and context switching. The cpu can be specified through the cpulist.</li>
  </ul>
 </dd> 
	 
</dl>
]]>
</os_tuning>

<firmware>
<![CDATA[
<dl>

<dt><b>Determinism Control:</b></dt> 
 <dd>
  This BIOS option allows user can set customized determinism slider mode to control performance. 
  <ul>
      <li>Auto (Default setting): Use the fused determinism slider mode.</li>
	  
      <li>Manual: Let user specifies customized determinism slider mode.</li>
  </ul>
 </dd>

<dt><b>Determinism Enable:</b></dt> 
 <dd>
  This BIOS option allows for AGESA determinism to control performance. 
  <ul>
      <li>Performance: Provides predictable performance across all processors of the same type.</li>      

      <li>Power: Maximizes performance within the power limits defined by TDP and PPT.</li>

      <li>Auto (Default setting): Use AGESA default value for deterministic performance control.</li>
  </ul>
 </dd>

<dt><b>TDP Control:</b></dt> 
 <dd>
  This BIOS option is for "Configurable TDP (cTDP)", it allows user can set customized value for TDP. Available settings are:
  <ul>
	  <li>Auto(Default setting): Use the fused TDP value.</li>
	  
	  <li>Manual: Let user specifies customized TDP value.</li>
  </ul>
 </dd>
 
 <dt><b>TDP:</b></dt> 
 <dd>
  TDP is an acronym for "Thermal Design Power." TDP is the recommended target for power used when designing the cooling capacity for a server. 
  EPYC processors are able to control this target power consumption within certain limits. This capability is referred to as "configurable TDP" or "cTDP."
  TDP can be used to reduce power consumption for greater efficiency, or in some cases, increase power consumption above the default value to provide additional performance.
  TDP is controlled using a BIOS option.<br/>
<br/>
  The default EPYC TDP value corresponds with the microprocessor's nominal TDP. 
  The default TDP value is set at a good balance between performance and energy efficiency. 
  The EPYC 9654 TDP can be reduced as low as 320W, which will minimize the power consumption for the processor under load, but at the expense of peak performance. 
  Increasing the EPYC 9654 TDP to 400W will maximize peak performance by allowing the CPU to maintain higher dynamic clock speeds, but will make the microprocessor less energy efficient. 
  Note that at maximum TDP, the CPU thermal solution must be capable of dissipating at least 400W or the EPYC 9654 processor might engage in thermal throttling under load.
  The EPYC Turin CPU's max TDP can be 500W.If cTDP is greater than the maximum TDP of the CPU, the system takes the take min(TDP, cTDP).<br/>
<br/>
  The available TDP ranges for each EPYC model are in the table below:
<table>
	<tr><th>Model</th><th>Minimum TDP</th><th>Maximum TDP</th></tr>
	<tr><td>EPYC 9654</td><td>320</td><td>400</td></tr>
	<tr><td>EPYC 9654P</td><td>320</td><td>400</td></tr>
	<tr><td>EPYC 9554</td><td>320</td><td>400</td></tr>
	<tr><td>EPYC 9554P</td><td>320</td><td>400</td></tr>
	<tr><td>EPYC 9534</td><td>240</td><td>300</td></tr>
	<tr><td>EPYC 9474F</td><td>320</td><td>400</td></tr>
	<tr><td>EPYC 9374F</td><td>320</td><td>400</td></tr>
	<tr><td>EPYC 9354</td><td>240</td><td>300</td></tr>
	<tr><td>EPYC 9354P</td><td>240</td><td>300</td></tr>
	<tr><td>EPYC 9334</td><td>200</td><td>240</td></tr>
	<tr><td>EPYC 9224</td><td>200</td><td>240</td></tr>
	<tr><td>EPYC 9174F</td><td>320</td><td>400</td></tr>
	<tr><td>EPYC 9124</td><td>200</td><td>240</td></tr>
	<tr><td>EPYC 9355</td><td>240</td><td>300</td></tr>
	<tr><td>EPYC 9555</td><td>320</td><td>400</td></tr>
	<tr><td>EPYC 9655</td><td>320</td><td>400</td></tr>
	<tr><td>EPYC 9755</td><td>450</td><td>400</td></tr>
	<tr><td>EPYC 9965</td><td>450</td><td>500</td></tr>
	<tr><td>EPYC 9745</td><td>320</td><td>400</td></tr>
	<tr><td>EPYC 9825</td><td>320</td><td>400</td></tr>
	
</table>
  * TDP must remain below the thermal solution design parameters or thermal throttling could be frequently encountered.
 </dd> 

<dt><b>DRAM Scrub Time:</b></dt> 
 <dd>
  DRAM scrubbing is a mechanism for the memory controller to periodically read all memory locations and write back corrected data.
  The time interval for scrubbing the entire memory can be: Disabled/1 hour/4 hours/8 hours/12 hours/16 hours/24 hours/48 hours. Current default is Auto(24 hours).
  </dd>

<dt><b>NUMA Nodes Per Socket:</b></dt> 
 <dd>
      Specifies the number of desired NUMA nodes per populated socket in the system:
    <ul>
      <li>NPS1: Each physical processor is a NUMA node, and memory accesses are interleaved across all memory channels directly connected to the physical processor.</li>
      <li>NPS2: Each physical processor is two NUMA nodes, and memory accesses are interleaved across 4 memory channels.</li>
      <li>NPS4: Each physical processor is four NUMA nodes, and memory accesses are interleaved across 2 memory channels.</li>
      <li>Auto: Use AGESA default value. Current default is NPS1</li>
    </ul>
Current default is Auto.
  </dd>
  
<dt><b>APBDIS:</b></dt> 
 <dd>
Application Power Management (APM) allows the processor to provide maximum performance while remaining within
the specified power delivery and removal envelope. APM dynamically monitors processor activity and generates an
approximation of power consumption. If power consumption exceeds a defined power limit, a P-state limit is applied by
APM hardware to reduce power consumption. APM ensures that average power consumption over a thermally significant
time period remains at or below the defined power limit. Set APBDIS=1 will disable Data Fabric APM and the SOC P-state will be fixed.
  Available settings are:
  <ul>
      <li>0: Disable APBDIS.</li>      

      <li>1: Enable APBDIS.</li>

      <li>Auto (Default setting): Use default value for APBDIS. The current value is 0.</li>
  </ul>
 </dd>
 
<dt><b>ACPI SRAT L3 Cache As NUMA Domain:</b></dt> 
 <dd>
Each L3 Cache will be exposed as a NUMA node when enabling ACPI SRAT L3 Cache as a NUMA node. 
On a dual processor system, with up to 8 L3 Caches per processor, this setting will expose 16 NUMA domains.
  Available settings are:
  <ul>
      <li>Auto (Default setting): Disable this function. </li>
      <li>Enabled: Enable this function.</li>
  </ul>
</dd>

<dt><b>SMT Mode:</b></dt>
  <dd>
    Allows enabling or disabling symmetric multithreading. Available options Auto and Disable. Default is Auto.
  </dd>

<dt><b>PPT Control:</b></dt> 
 <dd>
  This BIOS option allows user can set customized value for processor package power limit(PPT). Available settings are:
  <ul>
          <li>Auto(Default setting): Use the fused PPT.</li>
          
          <li>Manual: User can set customized PPT.</li>
  </ul>
</dd>

<dt><b>PPT:</b></dt> 
 <dd>
  Set customize processor Package Power Limit (PPT) value to be used on all populated processors in the system. Current default value is 0.
</dd>

</dl>

]]>
</firmware>

</flagsdescription>
