Commit Graph

7 Commits

Author SHA1 Message Date
Anthony G. Basile
47367bc4df rules: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2017-09-03 13:20:33 -04:00
Anthony G. Basile
b226ddfc1b rules: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-11-23 20:00:48 -05:00
Richard Yao
b38f3aaba1 Solid state drives should use noop IO elevator
It is often suggested that users set noop on SSDs and it turns out that
udev can do this for users.

Setting noop disables the IO priorization and IO reordering logic inside
the kernel, but leaves front/back merging in place. This reduction in
overhead should increase the number of requests sent to solid state
media to the maximum possible,which is said to improve performance on
SSDs. Unfortunately, few benchmarks try real world work loads with a
clear cache to measure the actual difference.

The benchmarks conducted by Daniel Nashed cleared the cache. They favor
noop, although the workload seems somewhat unrealistic:

http://blog.nashcom.de/nashcomblog.nsf/dx/linux-io-performance-tweek.htm

The BFQ developers' benchmarks on SSDs appear to account for both. They
show noop as being far better than CFQ and second only to BFQ, which is
out of tree:

https://lwn.net/Articles/600366/

In addition, I have experienced lockup-like effects on ext4 on an OCZ
Vertex 2 SSD with the discard mount option enabled when recursively
unlinking a subdirectory path that contains millions of files. The
system was useless for hours. Setting noop allowed the unlink to finish
in minutes. This is because the reordering from CFQ interleaved the
TRIM command with write IOs, effectively putting barriers between them
because because TRIM is a non-queued command prior to SATA 3.1.

A good default should perform well in general and have the property that
poor performance in the worst case scenarios is minimized. The
previous examples contradict CFQ's ability to achieve that on solid
state media.

I believe that we should implement a udev rule to set noop on solid
state media by default. It should be said that Milan Broz wrote it
first, although there is only one way to write this rule in a manner
consistent with the codebase:

http://permalink.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/6045

It should be said that this will be a regression for those that rely on
the "Block IO Controller" cgroup because it is only supported by CFQ
when CONFIG_CFQ_GROUP_IOSCHED=y. My experience as a ZoL developer is
that very few users rely on this behavior and consequently, I believe
that the benefit from enabling this far outweighs the harm to the few
that need it. Those that do need it should be able to disable this rule
themselves. Container management software that expects the Block IO
Controller to be supported should be modified to enable CFQ explicitly
if it does not already do that.

This has been tested against both a SATA mechanical drive and a SATA
solid state drive. It changes the elevator to noop on the solid state
drive, but does not touch it on the mechanical drive.

Signed-off-by: Richard Yao <ryao@gentoo.org>
2015-08-29 15:21:44 -04:00
Alex Crawford
03638dd242 rules: whitelist xvd* devices
Xen disks need to be whitelisted as well.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:17:13 -04:00
Tom Gundersen
0617e636ab rules: restore block watch after CHANGE events
When processing an event, the watch is disabled, make sure it is restorted after
a CHANGE event has been processed.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:14:41 -04:00
Tom Gundersen
ebcaf4b310 rules: fix typo in block watch rule
The intention was to turn this rule from using a blacklist to a whitelist, but
there was a stray '!'.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:13:39 -04:00
Kay Sievers
586a3da832 rules: move block device rules to its own rules file
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18 15:13:47 -04:00