Linux Recommended Settings for NGX Storage
This guide provides best practices to ensure optimal performance form Linux host environments with NGX Storage. In this example, we used Red Hat Enterprise Linux 8, but this procedure also works on Pardus, Ubuntu, Debian, openSUSE , SLES, Rocky Linux systems.
IO Schedulers and Queue Settings
The disk scheduler is responsible for ordering the I/O requests submitted to a storage device. NGX Storage recommend to change the I/O scheduler to “none” (for RedHat 7 it is “noop“), to get better performance with lower CPU overhead than the default schedulers.
This settings can be change per device on a running system (at runtime, lost once rebooted).
Collect NGX-IO devices:
# grep NGX-IO /sys/block/sd*/device/vendor /sys/block/sdb/device/vendor:NGX-IO /sys/block/sdc/device/vendor:NGX-IO /sys/block/sdd/device/vendor:NGX-IO /sys/block/sde/device/vendor:NGX-IO
Turn on the none scheduler for a device:
$ echo 'none' > /sys/block/sdb/queue/scheduler $ cat /sys/block/sdb/queue/scheduler [none] mq-deadline kyber bfq
You can use below example to quickly set all NGX luns to the ‘none’ elevator:
# for sd in $(lsscsi | grep NGX-IO | awk '{print $7}'); do echo none > /sys/block/${sd##/dev/}/queue/scheduler ; done
These changes will not persist unless they are added with TuneD or the udev rule for Linux hosts.
Setting the Disk Scheduler Using TuneD
Below procedure creates and enables a TuneD profile that sets a given disk scheduler for selected block devices. The setting persists across system reboots.
1. To see which profile is currently active, use:
# tuned-adm active
2. Create a new directory for your TuneD profile:
# mkdir /etc/tuned/ngx-profile
3. Collect the system unique identifier of the selected block device:
# udevadm info --query=property --name=/dev/sdb | grep -E '(WWN|SERIAL)' ID_SCSI_SERIAL=589c00fca0b3fa15 ID_SERIAL=3589c00fca0b3fa15c9561490731619ef ID_SERIAL_SHORT=589c00fca0b3fa15c9561490731619ef ID_WWN=0x589c00fca0b3fa15 ID_WWN_VENDOR_EXTENSION=0xc9561490731619ef ID_WWN_WITH_EXTENSION=0x589c00fca0b3fa15c9561490731619ef SCSI_IDENT_SERIAL=589c00fca0b3fa15
The command in the this example will return all values identified as a World Wide Name (WWN) or Serial Number associated with the specified block device.
4. Create the /etc/tuned/ngx-profile/tuned.conf configuration file. In the file, set the following options:
[disk] devices_udev_regex=ID_WWN=0x589c00fca0b3fa15 elevator=none
To match multiple devices in the “devices_udev_regex” option, enclose the identifiers in parentheses and separate them with vertical bars:
[disk] devices_udev_regex=(ID_WWN=0x589c00fca0b3fa15)|(ID_WWN=0x589c00...) elevator=none
5. Enable the new ngx-profile and verify the settings:
# tuned-adm profile ngx-profile # tuned-adm active # tuned-adm verify
Setting the Disk Scheduler Using udev rule
This procedure sets a given disk scheduler for specific block devices using “udev rules”. The setting persists across system reboots.
1. Collect the system unique identifier of the selected block device:
# udevadm info --query=property --name=/dev/sdb | grep -E '(WWN|SERIAL)' ID_SCSI_SERIAL=589c00fca0b3fa15 ID_SERIAL=3589c00fca0b3fa15c9561490731619ef ID_SERIAL_SHORT=589c00fca0b3fa15c9561490731619ef ID_WWN=0x589c00fca0b3fa15 ID_WWN_VENDOR_EXTENSION=0xc9561490731619ef ID_WWN_WITH_EXTENSION=0x589c00fca0b3fa15c9561490731619ef SCSI_IDENT_SERIAL=589c00fca0b3fa15
2. Configure the udev rule. Create the /etc/udev/rules.d/99-ngxstorage.rules file with the following content:
ACTION=="add|change", SUBSYSTEM=="block", ENV{ID_WWN}=="0x589c00fca0b3fa15", ATTR{queue/scheduler}="none"
We are strongly recommending below udev rule with NGX Storage. Applicable for RHEL 8.x and SuSE 15.2 and higher:
# IO Scheduler settings, reduce rng overhead,force rq_affinity the completion to run on the requesting cpu, set scsi device timeout 120. ACTION=="add|change", SUBSYSTEM=="block", ENV{ID_WWN}=="0x589c00*", ATTR{queue/scheduler}="none" , ATTR{queue/add_random}="0", ATTR{queue/rq_affinity}="2" , ATTR{device/timeout}="120"
NGX Storage Recommended DM-Multipath Settings
The following /etc/multipath.conf file has been tested with recent versions of RHEL 8. It provides settings for volumes on NGX Storage exposed via either iSCSI or Fibre Channel. Prior to use, verify the configuration with multipath -t. Some settings may be incompatible with older distributions.
defaults { polling_interval 5 user_friendly_names yes } devices { device { vendor "NGX-IO.*" product "NGX-IO ISCSI" path_grouping_policy group_by_prio prio alua path_checker tur failback immediate no_path_retry queue flush_on_last_del yes dev_loss_tmo infinity detect_prio yes } } blacklist { wwid dcc2753ffa270f576957f426a0e944dd } multipaths { multipath { wwid 3589c00 ... alias lun1 } multipath { wwid 3589c00 ... alias lun2 } multipath { wwid 3589c00 ... alias lun3 } multipath { wwid 3589c00 ... alias lun4 } }
Reference Links
COPYRIGHT
© 2022 NGX Teknoloji A.Ş. (NGX Storage). All rights reserved. Printed in the Turkey. Specifications subject to change without notice. No part of this document covered by copyright may be reproduced in any form or by any means-graphic, electronic, or mechanical, including photocopying, recording, taping, or storage in an electronic retrieval system-without prior written permission of NGX Storage. Software derived from copyrighted NGX Storage material is subject to the following license and disclaimer:
THIS SOFTWARE IS PROVIDED BY NGX Storage “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL NGX Storage BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NGX Storage reserves the right to change any products described herein at any time, and without notice. NGX Storage assumes no responsibility or liability arising from the use of products described herein, except as expressly agreed to in writing by NGX Storage. The use or purchase of this product does not convey a license under any patent rights, trademark rights, or any other intellectual property rights of NGX Storage.
TRADEMARK
NGX Storage and the NGX Storage logo are trademarks of NGX TEKNOLOJI A.Ş. Other company and product names may be trademarks of their respective owners.