* General question (scheduler) with SSDs? @ 2009-02-19 13:38 Justin Piszcz 2009-02-19 13:50 ` Pádraig Brady ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Justin Piszcz @ 2009-02-19 13:38 UTC (permalink / raw) To: linux-kernel; +Cc: linux-ide, linux-raid Hello, I was curious if anyone had done any benchmarks and/or has conclusive information, what is the best Linux scheduler to use with SSDs? Noop? CFQ? AS? Deadline? Justin. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-19 13:38 General question (scheduler) with SSDs? Justin Piszcz @ 2009-02-19 13:50 ` Pádraig Brady 2009-02-20 9:31 ` Sitsofe Wheeler 2009-02-20 9:43 ` Sitsofe Wheeler 2 siblings, 0 replies; 13+ messages in thread From: Pádraig Brady @ 2009-02-19 13:50 UTC (permalink / raw) To: Justin Piszcz; +Cc: linux-kernel, linux-ide, linux-raid Justin Piszcz wrote: > Hello, > > I was curious if anyone had done any benchmarks and/or has conclusive > information, what is the best Linux scheduler to use with SSDs? > > Noop? > CFQ? > AS? > Deadline? There was a thread started on that recently: http://lkml.org/lkml/2009/1/30/288 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-19 13:38 General question (scheduler) with SSDs? Justin Piszcz 2009-02-19 13:50 ` Pádraig Brady @ 2009-02-20 9:31 ` Sitsofe Wheeler 2009-02-20 9:43 ` Sitsofe Wheeler 2 siblings, 0 replies; 13+ messages in thread From: Sitsofe Wheeler @ 2009-02-20 9:31 UTC (permalink / raw) To: Justin Piszcz; +Cc: linux-kernel, linux-ide, linux-raid On Thu, Feb 19, 2009 at 08:38:38AM -0500, Justin Piszcz wrote: > Hello, > > I was curious if anyone had done any benchmarks and/or has conclusive > information, what is the best Linux scheduler to use with SSDs? > > Noop? > CFQ? > AS? > Deadline? As mentioned in another mail :wq -- Sitsofe | http://sucs.org/~sits/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-19 13:38 General question (scheduler) with SSDs? Justin Piszcz 2009-02-19 13:50 ` Pádraig Brady 2009-02-20 9:31 ` Sitsofe Wheeler @ 2009-02-20 9:43 ` Sitsofe Wheeler 2009-02-20 10:37 ` Justin Piszcz 2009-02-20 11:16 ` Kay Sievers 2 siblings, 2 replies; 13+ messages in thread From: Sitsofe Wheeler @ 2009-02-20 9:43 UTC (permalink / raw) To: Justin Piszcz; +Cc: linux-kernel, linux-ide, linux-raid Whoops, I didn't mean to send that previous half formed mail :) Sorry. On Thu, Feb 19, 2009 at 08:38:38AM -0500, Justin Piszcz wrote: > > I was curious if anyone had done any benchmarks and/or has conclusive > information, what is the best Linux scheduler to use with SSDs? > > Noop? > CFQ? > AS? > Deadline? As mentioned in another mail there was a discussion on http://lkml.org/lkml/2009/1/31/28 and long thread talking about the introduction of the rotational flag here http://lkml.org/lkml/2009/1/5/340 . Cheapo SSDs or even USB keys are not auto detected as non-rotational devices by the kernel and after a bit of poking about I've come up with the following udev rules for my particular cases: SUBSYSTEM=="block", TEST=="/sys$devpath/queue/rotational", ATTRS{model}=="ASUS-PHISON *", RUN+="/bin/sh -c 'echo 0 > /sys$devpath/queue/rotational'" SUBSYSTEM=="block", TEST=="/sys$devpath/queue/rotational", ATTRS{idVendor}=="0951", ATTRS{idProduct}=="1606", RUN+="/bin/sh -c 'echo 0 > /sys$devpath/queue/rotational'" SUBSYSTEM=="block", TEST=="/sys$devpath/queue/rotational", ATTRS{manufacturer}=="SanDisk", ATTRS{product}=="Cruzer Micro", RUN+="/bin/sh -c 'echo 0 > /sys$devpath/queue/rotational'" Ever since the rotational option appeared I've been trying cfq but prior to that I was using noop or deadline. However it doesn't look like anyone has sat down and run the numbers to see what affect the ioscheulder/rotational flag is having on cheapo SSDs - all the suggestions are anecdotal. Could you run some benchmarks with these different options and report back the results? -- Sitsofe | http://sucs.org/~sits/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-20 9:43 ` Sitsofe Wheeler @ 2009-02-20 10:37 ` Justin Piszcz 2009-02-20 10:44 ` Sitsofe Wheeler 2009-02-20 11:16 ` Kay Sievers 1 sibling, 1 reply; 13+ messages in thread From: Justin Piszcz @ 2009-02-20 10:37 UTC (permalink / raw) To: Sitsofe Wheeler; +Cc: linux-kernel, linux-ide, linux-raid On Fri, 20 Feb 2009, Sitsofe Wheeler wrote: > Whoops, I didn't mean to send that previous half formed mail :) Sorry. > > As mentioned in another mail there was a discussion on > http://lkml.org/lkml/2009/1/31/28 and long thread talking about the > introduction of the rotational flag here > http://lkml.org/lkml/2009/1/5/340 . Cheapo SSDs or even USB keys are not > auto detected as non-rotational devices by the kernel and after a bit of > poking about I've come up with the following udev rules for my > particular cases: > > SUBSYSTEM=="block", TEST=="/sys$devpath/queue/rotational", ATTRS{model}=="ASUS-PHISON *", RUN+="/bin/sh -c 'echo 0 > /sys$devpath/queue/rotational'" > SUBSYSTEM=="block", TEST=="/sys$devpath/queue/rotational", ATTRS{idVendor}=="0951", ATTRS{idProduct}=="1606", RUN+="/bin/sh -c 'echo 0 > /sys$devpath/queue/rotational'" > SUBSYSTEM=="block", TEST=="/sys$devpath/queue/rotational", ATTRS{manufacturer}=="SanDisk", ATTRS{product}=="Cruzer Micro", RUN+="/bin/sh -c 'echo 0 > /sys$devpath/queue/rotational'" > > Ever since the rotational option appeared I've been trying cfq but prior > to that I was using noop or deadline. However it doesn't look like > anyone has sat down and run the numbers to see what affect the > ioscheulder/rotational flag is having on cheapo SSDs - all the > suggestions are anecdotal. Could you run some benchmarks with these > different options and report back the results? > > -- > Sitsofe | http://sucs.org/~sits/ > $ grep rotational -r /usr/src/linux/ /usr/src/linux/drivers/scsi/NCR5380.c: * USLEEP_POLL should be a maximum rotational latency. /usr/src/linux/fs/partitions/sun.c: __be16 rspeed; /* Disk rotational speed */ /usr/src/linux/fs/ufs/ufs_fs.h: * Compute the cylinder and rotational position of a cyl block addr. /usr/src/linux/fs/ufs/ufs_fs.h: __fs32 fs_nrpos; /* number of rotational positions */ /usr/src/linux/fs/ufs/ufs_fs.h:#define UFS_42POSTBLFMT -1 /* 4.2BSD rotational table format */ /usr/src/linux/fs/ufs/ufs_fs.h:#define UFS_DYNAMICPOSTBLFMT 1 /* dynamic rotational table format */ /usr/src/linux/fs/ufs/ufs_fs.h: __s32 s_nrpos; /* number of rotational positions */ /usr/src/linux/include/linux/blkdev.h:#define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ /usr/src/linux/include/linux/genhd.h: __u16 d_rpm; /* rotational speed */ # find /sys/|grep -i rotational # Which kernel{option} do you enable to enable support for that option in /sys? Justin. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-20 10:37 ` Justin Piszcz @ 2009-02-20 10:44 ` Sitsofe Wheeler 0 siblings, 0 replies; 13+ messages in thread From: Sitsofe Wheeler @ 2009-02-20 10:44 UTC (permalink / raw) To: Justin Piszcz; +Cc: linux-kernel, linux-ide, linux-raid On Fri, Feb 20, 2009 at 05:37:44AM -0500, Justin Piszcz wrote: > > Which kernel{option} do you enable to enable support for that option in > /sys? It's new to 2.6.29 (it's available in at least 2.6.29rc5). I don't believe I enabled anything special to get it. -- Sitsofe | http://sucs.org/~sits/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-20 9:43 ` Sitsofe Wheeler 2009-02-20 10:37 ` Justin Piszcz @ 2009-02-20 11:16 ` Kay Sievers 2009-02-20 13:12 ` Sitsofe Wheeler 1 sibling, 1 reply; 13+ messages in thread From: Kay Sievers @ 2009-02-20 11:16 UTC (permalink / raw) To: Sitsofe Wheeler; +Cc: Justin Piszcz, linux-kernel, linux-ide, linux-raid On Fri, Feb 20, 2009 at 10:43, Sitsofe Wheeler <sitsofe@yahoo.com> wrote: > Whoops, I didn't mean to send that previous half formed mail :) Sorry. > > On Thu, Feb 19, 2009 at 08:38:38AM -0500, Justin Piszcz wrote: >> >> I was curious if anyone had done any benchmarks and/or has conclusive >> information, what is the best Linux scheduler to use with SSDs? >> >> Noop? >> CFQ? >> AS? >> Deadline? > > As mentioned in another mail there was a discussion on > http://lkml.org/lkml/2009/1/31/28 and long thread talking about the > introduction of the rotational flag here > http://lkml.org/lkml/2009/1/5/340 . Cheapo SSDs or even USB keys are not > auto detected as non-rotational devices by the kernel and after a bit of > poking about I've come up with the following udev rules for my > particular cases: > > SUBSYSTEM=="block", TEST=="/sys$devpath/queue/rotational", ATTRS{model}=="ASUS-PHISON *", RUN+="/bin/sh -c 'echo 0 > /sys$devpath/queue/rotational'" Udev can write to the attribute itself. This should be all you need: SUSBSYTEM=="block", ATTRS{model}=="ASUS-PHISON *", ATTR{queue/rotational}="1" Kay ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-20 11:16 ` Kay Sievers @ 2009-02-20 13:12 ` Sitsofe Wheeler 2009-02-20 13:23 ` Kay Sievers 0 siblings, 1 reply; 13+ messages in thread From: Sitsofe Wheeler @ 2009-02-20 13:12 UTC (permalink / raw) To: Kay Sievers; +Cc: Justin Piszcz, linux-kernel, linux-ide, linux-raid On Fri, Feb 20, 2009 at 12:16:42PM +0100, Kay Sievers wrote: > > Udev can write to the attribute itself. This should be all you need: > SUSBSYTEM=="block", ATTRS{model}=="ASUS-PHISON *", ATTR{queue/rotational}="1" I tried SUBSYSTEM=="block", ATTRS{model}=="ASUS-PHISON *", ATTR{queue/rotational}="0" but udevtest /sys/block/sda/ doesn't list it as firing (udev 117-8)... -- Sitsofe | http://sucs.org/~sits/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-20 13:12 ` Sitsofe Wheeler @ 2009-02-20 13:23 ` Kay Sievers 2009-02-20 14:27 ` Sitsofe Wheeler 0 siblings, 1 reply; 13+ messages in thread From: Kay Sievers @ 2009-02-20 13:23 UTC (permalink / raw) To: Sitsofe Wheeler; +Cc: Justin Piszcz, linux-kernel, linux-ide, linux-raid On Fri, Feb 20, 2009 at 14:12, Sitsofe Wheeler <sitsofe@yahoo.com> wrote: > On Fri, Feb 20, 2009 at 12:16:42PM +0100, Kay Sievers wrote: >> >> Udev can write to the attribute itself. This should be all you need: >> SUSBSYTEM=="block", ATTRS{model}=="ASUS-PHISON *", ATTR{queue/rotational}="1" > > I tried > SUBSYSTEM=="block", ATTRS{model}=="ASUS-PHISON *", ATTR{queue/rotational}="0" > but udevtest /sys/block/sda/ doesn't list it as firing (udev 117-8)... I does here: udev_rules_apply_to_event: ATTR '/sys/devices/ ... /sdb/queue/rotational' writing '0' $grep . /sys/class/block/*/queue/rotational /sys/class/block/sda/queue/rotational:1 /sys/class/block/sdb/queue/rotational:0 Maybe "udevtest" is not showing it for you, or udev 117 is too old and does not work that way. Thanks, Kay ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-20 13:23 ` Kay Sievers @ 2009-02-20 14:27 ` Sitsofe Wheeler 2009-02-20 14:56 ` Kay Sievers 0 siblings, 1 reply; 13+ messages in thread From: Sitsofe Wheeler @ 2009-02-20 14:27 UTC (permalink / raw) To: Kay Sievers; +Cc: Justin Piszcz, linux-kernel, linux-ide, linux-raid On Fri, Feb 20, 2009 at 02:23:38PM +0100, Kay Sievers wrote: > On Fri, Feb 20, 2009 at 14:12, Sitsofe Wheeler <sitsofe@yahoo.com> wrote: > > > > I tried > > SUBSYSTEM=="block", ATTRS{model}=="ASUS-PHISON *", ATTR{queue/rotational}="0" > > but udevtest /sys/block/sda/ doesn't list it as firing (udev 117-8)... > > I does here: > udev_rules_apply_to_event: ATTR '/sys/devices/ ... > /sdb/queue/rotational' writing '0' > > $grep . /sys/class/block/*/queue/rotational > /sys/class/block/sda/queue/rotational:1 > /sys/class/block/sdb/queue/rotational:0 > > Maybe "udevtest" is not showing it for you, or udev 117 is too old and > does not work that way. After you mentioned this I tried again and seemingly I was mistaken - it does work as you described. I had to make a slight rule tweak to stop it matching on partitions though: SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", ATTRS{model}=="ASUS-PHISON *", ATTR{queue/rotational}="0" SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", ATTRS{idVendor}=="0951", ATTRS{idProduct}=="1606", ATTR{queue/rotational}="0" SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", ATTRS{manufacturer}=="SanDisk", ATTRS{product}=="Cruzer Micro", ATTR{queue/rotational}="0" Thanks! -- Sitsofe | http://sucs.org/~sits/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-20 14:27 ` Sitsofe Wheeler @ 2009-02-20 14:56 ` Kay Sievers 2009-02-20 19:25 ` Sitsofe Wheeler 0 siblings, 1 reply; 13+ messages in thread From: Kay Sievers @ 2009-02-20 14:56 UTC (permalink / raw) To: Sitsofe Wheeler; +Cc: Justin Piszcz, linux-kernel, linux-ide, linux-raid On Fri, Feb 20, 2009 at 15:27, Sitsofe Wheeler <sitsofe@yahoo.com> wrote: > On Fri, Feb 20, 2009 at 02:23:38PM +0100, Kay Sievers wrote: >> On Fri, Feb 20, 2009 at 14:12, Sitsofe Wheeler <sitsofe@yahoo.com> wrote: >> > >> > I tried >> > SUBSYSTEM=="block", ATTRS{model}=="ASUS-PHISON *", ATTR{queue/rotational}="0" >> > but udevtest /sys/block/sda/ doesn't list it as firing (udev 117-8)... >> >> I does here: >> udev_rules_apply_to_event: ATTR '/sys/devices/ ... >> /sdb/queue/rotational' writing '0' >> >> $grep . /sys/class/block/*/queue/rotational >> /sys/class/block/sda/queue/rotational:1 >> /sys/class/block/sdb/queue/rotational:0 >> >> Maybe "udevtest" is not showing it for you, or udev 117 is too old and >> does not work that way. > > After you mentioned this I tried again and seemingly I was mistaken - it > does work as you described. Great. > I had to make a slight rule tweak to stop > it matching on partitions though: > > SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", ATTRS{model}=="ASUS-PHISON *", ATTR{queue/rotational}="0" Newer kernels have DEVTYPE in the envent environment, and: ENV{DEVTYPE}=="disk" can be used, which is easier and more reliable. Also the whitespace after "...PHISON *" does not need to be matched. If the match value does not end in whitespace itself, udev will match against the value with all trailing whitespace ignored. Kay ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-20 14:56 ` Kay Sievers @ 2009-02-20 19:25 ` Sitsofe Wheeler 2009-02-20 19:35 ` Kay Sievers 0 siblings, 1 reply; 13+ messages in thread From: Sitsofe Wheeler @ 2009-02-20 19:25 UTC (permalink / raw) To: Kay Sievers Cc: Sitsofe Wheeler, Justin Piszcz, linux-kernel, linux-ide, linux-raid On Fri, Feb 20, 2009 at 03:56:06PM +0100, Kay Sievers wrote: > Also the whitespace after "...PHISON *" does not need to be matched. > If the match value does not end in whitespace itself, udev will match > against the value with all trailing whitespace ignored. Ah, I'm not matching against only whitespace: $ cat /sys/block/*/device/model ASUS-PHISON OB S ASUS-PHISON SSD (the first is the builtin faster SSD, the other is the slower removable SSD). -- Sitsofe | http://sucs.org/~sits/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: General question (scheduler) with SSDs? 2009-02-20 19:25 ` Sitsofe Wheeler @ 2009-02-20 19:35 ` Kay Sievers 0 siblings, 0 replies; 13+ messages in thread From: Kay Sievers @ 2009-02-20 19:35 UTC (permalink / raw) To: Sitsofe Wheeler; +Cc: Justin Piszcz, linux-kernel, linux-ide, linux-raid On Fri, Feb 20, 2009 at 20:25, Sitsofe Wheeler <sitsofe@yahoo.com> wrote: > On Fri, Feb 20, 2009 at 03:56:06PM +0100, Kay Sievers wrote: >> Also the whitespace after "...PHISON *" does not need to be matched. >> If the match value does not end in whitespace itself, udev will match >> against the value with all trailing whitespace ignored. > > Ah, I'm not matching against only whitespace: > > $ cat /sys/block/*/device/model > ASUS-PHISON OB S > ASUS-PHISON SSD > > (the first is the builtin faster SSD, the other is the slower removable > SSD). Ah, I see, then nothing to complain from my side anymore. :) Thanks, Kay ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-02-20 19:35 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-02-19 13:38 General question (scheduler) with SSDs? Justin Piszcz 2009-02-19 13:50 ` Pádraig Brady 2009-02-20 9:31 ` Sitsofe Wheeler 2009-02-20 9:43 ` Sitsofe Wheeler 2009-02-20 10:37 ` Justin Piszcz 2009-02-20 10:44 ` Sitsofe Wheeler 2009-02-20 11:16 ` Kay Sievers 2009-02-20 13:12 ` Sitsofe Wheeler 2009-02-20 13:23 ` Kay Sievers 2009-02-20 14:27 ` Sitsofe Wheeler 2009-02-20 14:56 ` Kay Sievers 2009-02-20 19:25 ` Sitsofe Wheeler 2009-02-20 19:35 ` Kay Sievers
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).