No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Performance Monitoring Guide

OceanStor Dorado V3 Series V300R002

This document describes performance monitoring of storage systems, including the monitoring method, indicator planning, configuration monitoring, and problem diagnosis.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Optimizing Block Device Parameter Settings of Linux

Optimizing Block Device Parameter Settings of Linux

Operating block devices will greatly affect host performance. Correct configuration of the queue depth, scheduling algorithm, prefetch volume, and I/O alignment for block devices helps improve the system performance.

Queue Depth

The queue depth determines the maximum number of concurrent I/Os written to the block device. In Linux, the default value is 128. Do not change the value unless absolutely necessary. To query the queue depth of the block device, run cat.

linux-ob3a:~ # cat /sys/block/sdc/queue/nr_requests 
128

In the event of testing the highest system performance, you can set the queue depth to a larger value to increase the I/O write pressure and the probability of combining I/Os in the queue. To temporarily change the queue depth of a block device, use the following method:

echo 256 > /sys/block/sdc/queue/nr_requests
NOTE:

You can tune the performance by temporarily changing the queue depth of a block device. After the application server is restarted, the queue depth is restored to the default value.

Scheduling Algorithm

Linux 2.6 kernel supports four types of block device scheduling algorithms: noop, anticipatory, deadline, and cfq. The default scheduling algorithm is cfq. To query the block device scheduling algorithm in use, run cat.

linux-ob3a:~ # cat /sys/block/sdc/queue/scheduler 
noop deadline [cfq] 

Inappropriate configuration of the scheduling algorithm affects system performance, such as I/O concurrency. You can use the following method to temporarily change the scheduling algorithm of the block device:

echo noop > /sys/block/sdc/queue/scheduler
NOTE:

You can tune the performance by temporarily changing the scheduling algorithm. After the application server is restarted, the scheduling algorithm is restored to the default value.

Prefetch Volume

Similar to the prefetch algorithm of a storage array, the prefetch function of Linux is only available for sequential read, sequential streams identification, and reading of data in the read_ahead_kb length (in units of sectors) in advance. For example, the default prefetch volume in SUSE 11 is 512 sectors, namely, 256 KB. To query the prefetch volume of the block device, run cat.

linux-ob3a:~ # cat /sys/block/sdc/queue/read_ahead_kb 
512

If an application needs to read a large number of large-sized files, you can raise the system performance by setting the prefetch volume to a larger value. To do this, use the following method:

echo 1024 > /sys/block/sdc/queue/read_ahead_kb

I/O Alignment

If MBR partitions are created in Linux or Windows (pre Windows Server 2003 versions), the first 63 sectors of a disk are reserved for the master boot record and partition table. The first partition starts from the 64th sector by default. As a result, misalignment occurs between data blocks (database or file system) delivered by hosts and data blocks stored in the storage array, causing poor I/O processing efficiency.

In Linux, you can resolve I/O misalignment in either of the following ways:

  • Method 1: Change the start location of a partition.

    When creating MBR partitions in Linux, it is recommended that you enter the expert mode of the fdisk command and set the start location of the first partition to that of the second extent on a LUN. The default extent size is 4 MB. The following is a quick command used to create an MBR partition in /dev/sdb. The partition uses all space of /dev/sdb. The start sector is set to 8192, namely, 4 MB.

    printf "n\np\n1\n\n\nx\nb\n1\n 8192\nw\n" | fdisk /dev/sdb
  • Method 2: Create GPT partitions.

    The following is a quick command used to create a GPT partition in /dev/sdb. The partition uses all space of /dev/sdb. The start sector is set to 8192, namely, 4 MB.

    parted -s -- /dev/sdb "mklabel gpt" "unit s" "mkpart primary 8192 -1" "print"

To create MBR partitions in Windows (pre Windows Server 2003 versions), it is recommended that you run diskpart to set partition alignment.

diskpart> select disk 1 
diskpart> create partition primary align=4096
Translation
Download
Updated: 2019-07-17

Document ID: EDOC1100049152

Views: 12499

Downloads: 86

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next