Day Three Best Practices
Performance Best Practices
Red Hat Enterprise Linux: Disk Schedulers
In this best practice, we changed the default Linux disk scheduler per Red Hat guidelines.
|
Category |
Operating System |
|
Product |
Red Hat Enterprise Linux 8.3 |
|
Type of best practice |
Performance Optimization |
|
Day and value |
Day 3, Fine Tuning |
Overview
There are several choices with Red Hat Enterprise Linux 8 for the type of disk scheduler used by the operating system. The function of the disk schedule is for ordering I/O requests to storage. Each disk scheduler provides a different method for managing storage requests:
- None: Implements a first-in first-out (FIFO) scheduling algorithm. The none scheduler is recommended for systems that have high performance storage like Solid State Drives (SSD) or Non-volatile Memory Express (NVMe) drives. The default schedule for NVMe is none.
- Mq-deadline: This scheduler groups queued I/O requests into batches. The I/O in the batches are organized by logical block addressing so that writes are organized by location to storage. The mq-deadline is suited for traditional HDD storage.
- Bfq: This scheduler priorities latency rather than maximum throughput. The bfq disk scheduler is recommended for desktop or interactive tasks and traditional HDD storage.
- Kyber: This scheduler tunes itself by analyzing I/O requests. A calculation is done with each IO test to determine if the I/O can be satisfied with the least amount of latency. Kyber is recommended for high performance storage like SSDs and NVMe drives.
In our best practice, we followed Red Hat’s recommendation of using the none disk scheduler as the PowerMax used NVMe drives.
Recommendation
The none disk scheduler provided a slight performance increase for the following metrics:
- New Orders per Minute (NOPM)
- Transactions per Minute (TPM)
- PowerMax IOPS
The performance metrics below showed no significant changes:
- Server CPU utilization
- DB File Sequential Read
- Log File Parallel Write
Overall, the None disk scheduler increased storage related performance as reflected in the increase in PowerMax IOPS, NOPM, and TPM metrics. There was a very slight drop in write latency on the PowerMax storage array and Log File Parallel Writes which should have improved our IOPS, NOPM and TPM metrics. Although the very slight decreases in write times were not significant the impact over time can increase performance. We believe this is what was observed in our OLTP load test.
Implementation Steps
To set disk scheduler using TUND:
- Find the system unique identifier of the selected block device
$ udevadm info --query=property --name=/dev/device | grep -E '(WWN|SERIAL)'
- Use a device name such as sdf in –name = /dev/sdf
- Create the /etc/tuned/my-profile/tuned.conf configuration file
[main] Include= existing-profile [disk] devices_udev_regex=ID_WWN=device system unique id elevator=selected-scheduler
- Replace device system unique id with the value of the chosen identifier (for example,0x5002538d00000000)
- To match multiple devices in the devices_udev_regex option, enclose the identifiers in parentheses and separate them with vertical bars
devices_udev_regex=(ID_WWN=0x5002538d00000000)|(ID_WWN=0x1234567800000000) elevator=none
- Enable your profile
# tuned-adm profile my-profile
- Verify that the Tuned profile is active and applied
$ tuned-adm active $ tuned-adm verify
Additional Resources
Red Hat Enterprise Linux 8: Setting the disk scheduler
Red Hat Enterprise Linux 8: Monitoring and managing system status and performance
Configuration Best Practices
Red Hat Enterprise Linux: NTP Protocol
In this best practice Network Time Protocol (NTP) is implemented. Implementing NTP across database servers allows all the databases to synchronize to the same time.
|
Category |
Operating System |
|
Product |
Red Hat Enterprise Linux 8.3 |
|
Type of best practice |
Configuration |
|
Day and value |
Day 3, Fine Tuning |
Overview
The Network Time Protocol (NTP) synchronizes clocks between computer systems using the network. In this best practice, our Oracle database servers will be synchronized. This is important for analyzing the systems, scheduling jobs, and perhaps implementing Oracle Real Application Clusters. This is not a performance best practice, as the goal is to have all our database servers synchronized from the same NTP server.
Recommendation
The expectation in implementing NTP on our servers was that there would be no significant impact to performance. The following performance metrics did not change when NTP was running on the database servers:
- New Orders per Minute (NOPM)
- Transactions per Minute (TPM)
- PowerMax IOPS.
- Server CPU utilization.
- DB File Sequential Read
- Log File Parallel Write
Implementation Steps
In Red Hat 8, the NTP protocol is implemented by the chrony daemon through the chrony package. The following steps detail how to configure the daemon:
- Install the chrony package on the server and client machines if it is not installed
#yum install chrony
- Check the status of chronyd service
# systemctl status chronyd
- Start the chronyd service if not running
# systemctl start chronyd
- To ensure the chronyd service auto starts at system boot
# systemctl enable chronyd
Configure NTP server:
- Open the chrony conf file and edit to make an entry to allow the local network to access the NTP server
# vi /etc/chrony.conf allow 10.230.82.0/24
- Save and close the file
- Restart chronyd service
Configure NTP client:
- Open the chrony conf file and edit to make an entry to allow the local network to access the NTP server
# vi /etc/chrony.conf allow 10.230.82.0/24
- Save and close the file
- Restart chronyd service
systemctl restart chronyd
Configure NTP client:
- Open the chrony conf file and edit to make an entry of NTP server
# vi /etc/chrony.conf allow 10.230.82.0/24
- Edit /etc/chrony.conf file by adding chrony
- Restart chronyd service
systemctl restart chronyd
- Check the time source (NTP server) that the client can access
#chronyc sources
- To check if chrony is synchronized:$chronyc tracking
- To check chony source statistics: $chronyc sourcestats
Additional Resources
Configuring Basic System Settings, Red Hat Enterprise Linux 8