Skip to content

Commit 6feda7a

Browse files
committed
feat(iscsi): Add PureStorage best practices for I/O scheduler
Signed-off-by: Yann LE BRIS <yann.lebris@vates.tech>
1 parent be61bb9 commit 6feda7a

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ SM_LIBS += constants
7171
SM_LIBS += cbtutil
7272
SM_LIBS += sr_health_check
7373

74-
UDEV_RULES = 65-multipath 55-xs-mpath-scsidev 57-usb 58-xapi
74+
UDEV_RULES = 65-multipath 55-xs-mpath-scsidev 57-usb 58-xapi 99-purestorage
7575
MPATH_DAEMON = sm-multipath
7676
MPATH_CONF = multipath.conf
7777
MPATH_CUSTOM_CONF = custom.conf

mk/sm.spec.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ tests/run_python_unittests.sh
222222
%config /etc/udev/rules.d/69-dm-lvm-metad.rules
223223
%config /etc/logrotate.d/SMlog
224224
%config /etc/udev/rules.d/57-usb.rules
225+
%config /etc/udev/rules.d/99-purestorage.rules
225226
%doc CONTRIB LICENSE MAINTAINERS README.md
226227

227228
%package fairlock

udev/99-purestorage.rules

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Recommended settings for Pure Storage FlashArray.
2+
# Use none scheduler for high-performance solid-state storage for SCSI devices
3+
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/scheduler}="none"
4+
ACTION=="add|change", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block", ENV{DM_NAME}=="3624a937*", ATTR{queue/scheduler}="none"
5+
6+
# Reduce CPU overhead due to entropy collection
7+
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/add_random}="0"
8+
ACTION=="add|change", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block", ENV{DM_NAME}=="3624a937*", ATTR{queue/add_random}="0"
9+
10+
# Spread CPU load by redirecting completions to originating CPU
11+
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/rq_affinity}="2"
12+
ACTION=="add|change", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block", ENV{DM_NAME}=="3624a937*", ATTR{queue/rq_affinity}="2"
13+
14+
# Set the HBA timeout to 60 seconds
15+
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{device/timeout}="60"

0 commit comments

Comments
 (0)