<?xml version="1.0"?>

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

<flagsdescription>

<filename>GIGABYTE-Platform-Flags-Intel-SPR-rev1.0</filename>

<title>Platform Settings for GIGABYTE SPR server systems</title>

<os_tuning>
<![CDATA[

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

<p><b>setterm</b>:</p>
<p>Used to disable screen blanking on text console:</p>
<ul>
<li>"setterm -powersave off -blank 0"</li>
</ul>

<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>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>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>Other options beside a generic performance governor can be set, such as the perf-bias:</p>
<p><b>--perf-bias, -b</b></p>
<p>On supported Intel processors, this option sets a register which allows the cpupower utility (or other software/firmware) to set a policy that controls the relative importance of performance versus energy savings to the processor. The range of valid numbers is 0-15, where 0 is maximum performance and 15 is maximum energy efficiency.</p>
<p>The processor uses this information in model-specific ways when it must select trade-offs between performance and energy efficiency. This policy hint does not supersede Processor Performance states (P-states) or CPU Idle power states (C-states), but allows software to have influence where it would otherwise be unable to express a preference.</p>
<p>On many Linux systems one can set the perf-bias for all CPUs through the cpupower utility with one of the following commands:</p>
<ul>
<li>"cpupower frequency-set -g performance"</li>
<li>"cpupower -c all set -b 0"</li>
<li>"cpupower -c all set --perf-bias 0"</li>
<li>"cpupower set -b 0"</li>
</ul>

<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 40 > /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>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>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>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>
<li><b>max_map_count-n</b>: The maximum number of memory map areas a process may have. Memory map areas are used as a side-effect of calling malloc, directly by mmap and mprotect, and also when loading shared libraries.</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>

]]>
</os_tuning>

<firmware>
<![CDATA[

<p><b>Firmware Settings</b></p>

<p><b>Power Policy Quick Settings: (Default = Standard)</b></p>
<p>This BIOS option controls the performance or power save setting, user can use this item to change it. Best performance can maximize the performance of the server. Energy efficiency can maximize the power efficiency of the server.</p>
<p>Values for this BIOS setting can be:</p>
<ul>
<li><b>Standard</b>: BIOS default setting.</li>
<li><b>Best Performance</b>: Maximize the performance of the server.</li>
<li><b>Energy Efficient</b>: Maximize the power efficiency of the server.</li>
</ul>

<p><b>SR-IOV Support (Default = Enabled):</b></p>
<p>If system has SR-IOV capable PCIe Devices, this option Enables or Disables Single Root IO Virtualization Support. Values for this BIOS option can be:</p>
<ul>
<li><b>Enabled</b>: Enables Single Root IO Virtualization Support.</li>
<li><b>Disabled</b>: Disables Single Root IO Virtualization Support.</li>
</ul>

<p><b>SNC (Sub NUMA) (Default = AUTO):</b></p>
<p>SNC breaks up the last level cache (LLC) into disjoint clusters based on address range, with each cluster bound to a subset of the memory controllers in the system. SNC improves average latency to the LLC and memory. SNC is a replacement for the cluster on die (COD) feature found in previous processor families. For a multi-socketed system, all SNC clusters are mapped to unique NUMA domains. (See also IMC interleaving.) Values for this BIOS option can be:</p>
<ul>
<li><b>AUTO</b>: When set the Auto, the value will decide by Intel RC.</li>
<li><b>Disabled</b>: Disable Sub NUMA</li>
<li><b>Enabled SNC2 (2-Clusters)</b>: Utilizes LLC capacity more efficiently and reduces latency due to core/IMC proximity. This may provide performance improvement on NUMA-aware operating systems.</li>
<li><b>Enabled SNC4 (4-Clusters)</b>: Same as SNC2. but this may provide performance improvement on NUMA-aware operating systems more than SNC2.</li>
</ul>

<p><b>Intel VT for Directed I/O (VT-d) (Default = Enabled):</b></p>
<p>Enable/Disable Intel Virtualization Technology for Directed I/O (VT-d) by reporting the I/O device assignment to VMM through DMAR ACPI Tables. Values for this BIOS option can be:</p>
<ul>
<li><b>Disabled</b>: Disable Intel VT-d.</li>
<li><b>Enabled</b>: Enable Intel VT-d.</li>
</ul>

<p><b>Enable LP [Global] (Default = Enabled):</b></p>
<p>Enables Logical processor (Software Method to Enable/Disable Logical Processor threads) Values for this BIOS option can be:</p>
<ul>
<li><b>Disabled</b>: Disable Hyper-Threading.</li>
<li><b>Enabled</b>: Enable Hyper-Threading.</li>
</ul>

<p><b>First created January 04, 2023.</b></p>
]]>
</firmware>

</flagsdescription>
