Home > Workload Solutions > SQL Server > White Papers > SQL Server 2019 Best Practices on PowerEdge Servers and PowerStore T Model Arrays > Red Hat Enterprise Linux: SQL Server Tuned Profile
The “tuned-adm” command line tool enables switching between different tuning profiles in Linux. In this best practice, we used the “tuned-adm” tool to switch to an optimized Linux profile for SQL Server.
Overview
The Linux operating system provides a system tuning tool called “tuned.” This tool is a profile-based tool that uses udev device manager. The “tuned-adm” tool enables the Linux administrator to switch between profiles for the operating system. Pre-defined profiles enable the application of Linux configuration settings in a downloadable package. In this best practice, the TUNED-PROFILES-MSSQL was downloaded and installed in the Linux OS. This resulted in the following changes in the tuned SQL Server profile:
Certain configuration parameters that adjust the PM QoS CPU DA latency according to the CPU load. For example, the force latency parameter enables the user or in this case the SQL Server profile to force a specific value. For more information about this CPU configuration parameter and similar parameters, see the Red Hat Performance Tuning Guide.
Transparent HugePage Support (THP) automates the promotion and demotion of memory pages. Promotion is the automation from small memory pages to larger memory page sizes and demotion is the automation from larger memory pages to smaller memory pages. SQL Server uses transparent HugePages to optimize performance thus, this parameter is set to ALWAYS.
Swap space is used by the Linux kernel as virtual memory. The swappiness setting defines how aggressively the kernel will swap memory pages to disk. By changing VM.SWAPPINESS to 1, the kernel is instructed to swap as little as possible to disk and keep more memory pages in RAM.
The DIRTY_BACKGROUND_RATIO is the percentage of memory that contains free pages and reclaimable pages that can be filled with dirty pages before the pages are written to disk. Databases can aggressively use the kernel page cache which lowers the background ratio forcing the kernel to flush the dirty pages to disk more frequently.
The DIRTY_RATIO is the percentage of total system memory that contains dirty pages before the pages are written to disk. In setting dirty_ratio to 80, the kernel is instructed to use 80 percent of total system memory for dirty pages before having to flush the data to disk.
The DIRTY_EXPIRE_CENTISECS define in centisecs (one hundredth of a second) when data is old enough to be written to disk. By setting DIRTY_EXPIRE_CENTISECS to 500 a dirty page can stay in memory for 500 centisecs before it is written to disk.
The DIRTY_WRITEBACK_CENTISECS parameter defines the frequency that the kernel will check to write dirty pages to disk. In this case, a value of 100 centisecs instructs the kernel to check every 100 centisecs to write dirty pages to disk.
The MAX_MAP_COUNT defines the number of memory map areas a process may include. For example, databases use memory extensively which means increasing this value results in more memory map areas available for the database to use.
This best practice also included network and kernel settings updated by the MSSQL tuned profile. The following list describes the network and kernel settings that were updated by the MSSQL tuned profile:
The configuration changes made to the Linux operating system fine-tuned memory, network, and kernel configurations resulted in moderate performance improvements including more efficient use of system resources.
Additional Resources
Performance best practices and configuration guidelines for SQL Server on Linux