From: Tom Hughes Date: Wed, 3 Apr 2019 18:20:26 +0000 (+0100) Subject: Use a udev rule to enable request merging for NVME devices X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/d825d2d30731d4d7870af46aaec3eb5e225f909c Use a udev rule to enable request merging for NVME devices --- diff --git a/cookbooks/devices/templates/default/udev.rules.erb b/cookbooks/devices/templates/default/udev.rules.erb index 2d58f2186..9c703409d 100644 --- a/cookbooks/devices/templates/default/udev.rules.erb +++ b/cookbooks/devices/templates/default/udev.rules.erb @@ -52,3 +52,6 @@ ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="ST31000340NS", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,100,100 $env{DEVNAME}" ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="HGST_HTS725050A7E630", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,100,100 $env{DEVNAME}" ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="HGST_HTE721010A9E630", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,100,100 $env{DEVNAME}" + +# Enable request merging for NVME devices +ACTION=="add", SUBSYSTEM=="block", DRIVERS=="nvme", ATTR{queue/nomerges}="1" diff --git a/roles/dulcy.rb b/roles/dulcy.rb index 694c84f93..35c811f35 100644 --- a/roles/dulcy.rb +++ b/roles/dulcy.rb @@ -61,15 +61,6 @@ default_attributes( "daux" => "/ssd/tablespaces/daux", "iaux" => "/ssd/tablespaces/iaux" } - }, - :sysfs => { - :md_tune => { - :comment => "Enable request merging for NVMe devices", - :parameters => { - "block/nvme0n1/queue/nomerges" => "1", - "block/nvme1n1/queue/nomerges" => "1" - } - } } ) diff --git a/roles/eddie.rb b/roles/eddie.rb index 8e9c7c1a8..d900fbb4f 100644 --- a/roles/eddie.rb +++ b/roles/eddie.rb @@ -38,21 +38,6 @@ default_attributes( "kernel.shmall" => 66 * 1024 * 1024 * 1024 / 4096 } } - }, - :sysfs => { - :md_tune => { - :comment => "Enable request merging for NVMe devices", - :parameters => { - "block/nvme0n1/queue/nomerges" => "1", - "block/nvme1n1/queue/nomerges" => "1", - "block/nvme2n1/queue/nomerges" => "1", - "block/nvme3n1/queue/nomerges" => "1", - "block/nvme4n1/queue/nomerges" => "1", - "block/nvme5n1/queue/nomerges" => "1", - "block/nvme6n1/queue/nomerges" => "1", - "block/nvme7n1/queue/nomerges" => "1" - } - } } ) diff --git a/roles/karm.rb b/roles/karm.rb index 9f1fc2a9a..8f0ce7a23 100644 --- a/roles/karm.rb +++ b/roles/karm.rb @@ -41,21 +41,6 @@ default_attributes( "kernel.shmall" => 66 * 1024 * 1024 * 1024 / 4096 } } - }, - :sysfs => { - :md_tune => { - :comment => "Enable request merging for NVMe devices", - :parameters => { - "block/nvme0n1/queue/nomerges" => "1", - "block/nvme1n1/queue/nomerges" => "1", - "block/nvme2n1/queue/nomerges" => "1", - "block/nvme3n1/queue/nomerges" => "1", - "block/nvme4n1/queue/nomerges" => "1", - "block/nvme5n1/queue/nomerges" => "1", - "block/nvme6n1/queue/nomerges" => "1", - "block/nvme7n1/queue/nomerges" => "1" - } - } } ) diff --git a/roles/odin.rb b/roles/odin.rb index 32791077d..b6c64a1b1 100644 --- a/roles/odin.rb +++ b/roles/odin.rb @@ -49,15 +49,6 @@ default_attributes( } } }, - :sysfs => { - :md_tune => { - :comment => "Enable request merging for NVMe devices", - :parameters => { - "block/nvme0n1/queue/nomerges" => "1", - "block/nvme1n1/queue/nomerges" => "1" - } - } - }, :tile => { :database => { :cluster => "10/main",