1. Catalogs
  2. AMD
  3. Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note
video corpo

Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note

Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note
1 / 24 PagesView full catalog

Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note

Product catalog summary
Overview
The document outlines guidelines for optimizing AMD EPYC™-based servers to achieve low latency responses, essential for sectors like financial trading and real-time processing. The goal is to maintain system response times under 10 microseconds through hardware configuration, BIOS settings, operating system kernel configurations, and execution timing data collection techniques.
Hardware Configuration
Response times are influenced by the number of cores, execution threads per core, sockets, NUMA nodes, and cache topology. Tools such as lscpu and lstopo are recommended for system assessment. Optimizing memory placement and isolating application cores from interrupts are crucial for low latency.
System Management Mode (SMM)
SMM operates outside the OS to perform hardware tasks, with SMIs potentially increasing latency. Monitoring SMI counts with the perf subsystem is advised, and BIOS settings can be adjusted to reduce SMIs.
BIOS Configuration
BIOS settings significantly impact system latency. Selecting a Low Latency profile is recommended. Key settings include enabling prefetchers, disabling SR-IOV and AMD IOMMU, and optimizing NUMA group size. Disabling SMT and Core Performance Boost can reduce latency by minimizing resource sharing and frequency transitions.
Memory and Virtualization Options
Disabling Node Interleaving and Secure Memory Encryption can preserve local memory allocation and reduce latency. If virtualization is unnecessary, disabling related technologies like AMD Virtualization Technology and SR-IOV is advised.
Operating System Configuration
Using the RHEL 7 real-time kernel is recommended for latency requirements below 10 microseconds. The document provides tips for configuring the /proc filesystem and other kernel parameters to optimize performance.
Performance Tuning Guidelines
  • Verify running kernel and kernel command line parameters.
  • Optimize parameters such as swappiness, dirty_ratio, and sched_latency_ns for low latency.
  • Persistent tuning can be achieved by writing parameters into a sysctl configuration file.
Kernel Boot Parameters
  • Recommended parameters include idle=poll, transparent_hugepage=never, and audit=0.
  • Make these parameters permanent by modifying the /etc/default/grub configuration file.
Tuned-adm Profiles
  • Use Tuned-adm profiles for tuning, ensuring the Tuned daemon is active.
  • Create custom profiles to inherit settings from existing profiles.
Systemd Services
  • Disable or stop unnecessary services using systemctl to reduce latency.
Kernel Modules
  • Unload unnecessary kernel modules to optimize performance.
  • Blacklist modules to prevent loading at boot.
Kswapd Thread Affinity
  • Set the affinity of kswapd threads to non-benchmarking CPUs to avoid jitter.
IRQ Affinity
  • Affinitize interrupts to non-benchmarking CPUs to prevent jitter.
Kernel Timer Interrupts
  • Ensure CONFIG_HOTPLUG_CPU=y is set and manage CPU timers to optimize performance.
RCU Threads
  • Affinitize RCU operational threads to non-benchmarking CPUs.
Benchmarking System Latency
  • Latency benchmarks were conducted on HPE AMD EPYC™-based servers using HP-TimeTest7.4.
  • Key considerations include setting the correct threshold and loopcount parameters.
References
Several references are provided for further reading on low latency performance tuning.
See more

Catalog excerpts

Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-1

Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note Issue Date: June 2018 Advanced Micro Devices £1

 Open the catalog to page 1
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-2

© 2018 Advanced Micro Devices, Inc. All rights reserved. The information contained herein is for informational purposes only, and is subject to change without notice. While every precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and typographical errors, and AMD is under no obligation to update or otherwise correct this information. Advanced Micro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the contents of this document, and assumes no liability of any kind, including the implied...

 Open the catalog to page 2
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-3

Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note Contents Overview

 Open the catalog to page 3
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-4

Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note

 Open the catalog to page 4
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-5

56263 Rev. 3.01 June 2018 Performance Tuning Guidelines for Low Latency Response on AMD EPYCM-Based Servers Application Note

 Open the catalog to page 5
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-6

Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note Overview Low latency market segments, such as financial trading or real time processing, require for a server to provide consistent system response under 10 µs. This document provides guidance for tuning servers utilizing the AMD EPYC™ processor to reach this requirement. The guidelines cover hardware configuration, BIOS settings, operating system kernel configurations, scripts to control the environment of the target applications, and a description of the proper technique for collecting code execution...

 Open the catalog to page 6
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-7

56263 Rev. 3.01 June 2018 Performance Tuning Guidelines for Low Latency Response on AMD EPYCM-Based Servers Application Note >oot@l Qcal host Architecture: Byte Order: On-line CPU(s) list Th r ead £s) per cure: Carets) per socket: Socket £s) : NUMA node(s): Model name: NUMA nodeO CPU(s) NUMA nodel CPU(s) NUMA node2 CPU(s) node3 CPUfs) node4 CPUfs) nodes CPU(s) node6 CPU(s) node7 CPU(s) Flags: fpu vine de pse tsc msr pae mce cxS apic sep mtrr pge mca cmov pat pse36 clflush ranx fxsr sse sse2 ht syscall nx ranxext fxsr_opt pdpelgb rdtscp lm constant_tsc art rep_good nopl nonstop_tsc extd_apicid...

 Open the catalog to page 7
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-8

Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note Multiple options for the output format are available. An example of the graphical output generated by the following command line is provided in Figure 2. Figure 2. Output from lstopo for a One-Socket System Under Test Hardware Configuration

 Open the catalog to page 8
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-9

Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note To achieve the best response times, optimize the system topology where possible to match your operational needs. Be aware of the memory placement, install memory evenly across the NUMA nodes, and try to maximize the use of local memory. Isolate the cores executing your timecritical application from the operating system scheduler so that other applications and kernel threads do not steal execution time from your application. Isolate your application’s cores from interrupts as much as possible. Utilize...

 Open the catalog to page 9
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-10

Performance Tuning Guidelines for Low Latency 56263 Rev. 3.01 June 2018 Response on AMD EPYC™-Based Servers Application Note • Prefetcher -Enabled • L2 Stream HW Prefetcher - Enabled • SR-IOV - Disabled • Min Processor Idle Power Core C-State - No C-State - Disabled • NUMA Group Size Optimization - Clustered • Memory patrol scrubbing - Disabled • Memory Refresh Rate - 1X If there are other options that differentiate between power and performance, latency, or deterministic performance, choose those over power. For example, if available, choose Performance Determinism to minimize performance jitter....

 Open the catalog to page 10
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-11

Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note Memory Options Disable Node Interleaving to preserve the use of local node memory allocation. Local memory should provide the lowest access latency. The new AMD Secure Memory Encryption feature could cause a small latency increase. Disable if low latency is of higher priority than the new increased security. Virtualization Options If your application scenario does not require virtualization, then disable AMD Virtualization Technology. With virtualization disabled, also, disable AMD IOMMU. It can...

 Open the catalog to page 11
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-12

Performance Tuning Guidelines for Low Latency 56263 Rev. 3.01 June 2018 Response on AMD EPYCM-Based Servers Application Note Consider using the RHEL 7 real time kernel when the latency requirements are below 10 microseconds. This kernel has been especially tuned for low latency deterministic response. The real time kernel can be installed with the following commands: However, assuming the user does not want to use anything but the standard RHEL 7.4 kernel, the remaining tuning tips are illustrated with a two socket AMD EPYC™-based system with the standard kernel installed. Note: The 10 ps target...

 Open the catalog to page 12
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-13

56263 Rev. 3.01 June 2018 Performance Tuning Guidelines for Low Latency Response on AMD EPYCM-Based Servers Application Note Enter the following command to verify the kernel command line parameters used when the kernel was booted: BOOTJMAGE=/vmlinuz-3.10.0-362.el7.x36_64 root=/dev/mapper/rhel-root ro crashkernel=auto rd.lvm.lv=rhel/raat rd.lvm.lv=rhel/swap rhgb quiet idle=poll transparent_hugepage=never audit=0 selinux=0 nmi_watchdog=0 riohz=on clocksource=tsc nosoftlockup mce=ignore_ce cpuidle.off=1 skew_tick=1 processor.max_cstate=0 isolcpus=8-15 rcunocbs rcu_nocb_poll nohz_full acpi_irq_noba...

 Open the catalog to page 13
Performance Tuning Guidelines for Low Latency Response on AMD EPYC™-Based Servers Application Note-14

Performance Tuning Guidelines for Low Latency 56263 Rev. 3.01 June 2018 Response on AMD EPYCM-Based Servers Application Note Dirty_background_ratio is the limit to which, when dirty page exceeds, then they start getting written to the disk. Sched_lantency_ns represents the preemption latency of a CPU bound task. Increasing this value increases the task's timeslice. Sched_min_granularity_ns is the minimum preemption granularity for CPU bound tasks. Sched_migration_cost_ns determines how long a task remains cache-hot after the last execution and, hence, avoid migration off the CPU. Increasing this...

 Open the catalog to page 14

Archived catalogs

  1. 33358f_lx

    2  Pages

  2. M690T

    2  Pages

  3. E2400

    2  Pages

  4. E6760-MXM

    2  Pages

  5. E4690

    2  Pages

  6. Opteron_Product

    12  Pages

  7. Sempron

    12  Pages

  8. G-Series

    12  Pages

  9. E-Series

    12  Pages

  10. E6460

    2  Pages

  11. W5000

    2  Pages

  12. R series

    5  Pages

  13. V5800

    2  Pages

  14. V7900

    2  Pages

  15. W9100

    2  Pages

  16. W600

    2  Pages

  17. W4100

    2  Pages

  18. W2100

    2  Pages

  19. W7100

    2  Pages

  20. W4300

    2  Pages

  21. FirePro-W7100

    2  Pages

  22. V3900

    2  Pages

  23. W8100

    2  Pages

  24. FirePro-W5100

    2  Pages

*Prices are pre-tax. They exclude delivery charges and customs duties and do not include additional charges for installation or activation options. Prices are indicative only and may vary by country, with changes to the cost of raw materials and exchange rates.