You are not logged in.

#1 2014-07-10 04:27:33

the_nforcer
Member
From: Toronto, Ontario, Canada
Registered: 2014-02-01
Posts: 8

How to set SSD to use deadline scheduler on boot? [SOLVED]

So I tried setting a udev rule exactly like it explained in the wiki. You can find the page here

First off, I created a new rules file....

vi /etc/udev/rules.d/60-schedulers.rules

Then I added..

ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline"

Saved the file, rebooted, then checked the scheduler with....

cat /sys/block/sdX/queue/scheduler 

but it is still showing the default cfg, so I have to change it manually each time after boot.

Anyone know what the issue is here? Has something changed recently or am I doing something wrong? Any help would be greatly appreciated!

Last edited by the_nforcer (2014-07-10 08:19:23)

Offline

#2 2014-07-10 04:36:29

ooo
Member
Registered: 2013-04-10
Posts: 1,058

Re: How to set SSD to use deadline scheduler on boot? [SOLVED]

try rebuilding your initramfs so it includes the new rule.

# mkinitcpio -p linux

I'm not sure if this should be necessary, but could be if your rootfs is on the ssd

Last edited by ooo (2014-07-10 04:37:51)

Offline

#3 2014-07-10 04:57:54

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: How to set SSD to use deadline scheduler on boot? [SOLVED]

On that particular disk, is /sys/block/sdX/queue/rotational reporting a '0'?

Offline

#4 2014-07-10 05:01:53

the_nforcer
Member
From: Toronto, Ontario, Canada
Registered: 2014-02-01
Posts: 8

Re: How to set SSD to use deadline scheduler on boot? [SOLVED]

Thanks for the quick responses! I just tried running

# mkinitcpio -p linux

but that didn't resolve the problem. My rootfs is on the SSD and my /home is on a 2TB regular HDD if that helps. Basically trying to set the SSD to deadline at boot while leaving the regular HDD set to cfq.

Also, my SSD with root (/dev/sda) is displaying "0" and my HDD (/dev/sdb) is showing "1"

Last edited by the_nforcer (2014-07-10 05:04:02)

Offline

#5 2014-07-10 05:20:22

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: How to set SSD to use deadline scheduler on boot? [SOLVED]

Hmmm.... I wrote that little section of that page.  On every machine I have, this works just fine.  This is what I have (which is functionally the same as what you have):

% cat /etc/udev/rules.d/60-scheduler.rules
# Set deadline scheduler for non-rotational disks
ACTION=="add|change", KERNEL=="sd[a-z]", TEST!="queue/rotational", ATTR{queue/scheduler}="deadline"
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline"

Edit: When you run udevadm test /sys/block/sda does it tell you that it is applying the rule?  Mine outputs this:

# udevadm test /sys/block/sda
...whole bunch of shit...
ATTR '/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/queue/scheduler' writing 'deadline' /etc/udev/rules.d/60-schedulers.rules:3
...whole bunch more shit... 

Last edited by WonderWoofy (2014-07-10 05:25:18)

Offline

#6 2014-07-10 07:00:18

the_nforcer
Member
From: Toronto, Ontario, Canada
Registered: 2014-02-01
Posts: 8

Re: How to set SSD to use deadline scheduler on boot? [SOLVED]

I just added that second line (with the TEST command), ran mkinitcpio -p linux again then rebooted. My SSD is set to deadline and the HDD set to cfq.

Also, the "udevadm test /sys/block/sda" shows that the rule was loaded.

Issue resolved, thank you VERY much for the help guys!

Offline

#7 2014-07-10 07:49:38

karol
Archivist
Registered: 2009-05-06
Posts: 25,430

Re: How to set SSD to use deadline scheduler on boot? [SOLVED]

Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309

Offline

#8 2014-07-10 08:20:43

the_nforcer
Member
From: Toronto, Ontario, Canada
Registered: 2014-02-01
Posts: 8

Re: How to set SSD to use deadline scheduler on boot? [SOLVED]

Ok I just marked it [SOLVED] ... sorry I'm new to the forums. Thanks again for the help everyone.

Offline

Board footer

Powered by FluxBB