Package: bmap-tools
Version: 3.4-2
Severity: normal
Dear Maintainer,
Current version of bmap on combination with the current debian kernel gives a
terrible low performance:
$uname -a
Linux neopili 4.17.0-1-amd64 #1 SMP Debian 4.17.8-1 (2018-07-20) x86_64
GNU/Linux
$sudo bmaptool copy image.wic /dev/sdb
bmaptool: info: discovered bmap file 'image.wic.bmap'
bmaptool: info: block map format version 2.0
bmaptool: info: 248474 blocks of size 4096 (970.6 MiB), mapped 143428 blocks
(560.3 MiB or 57.7%)
bmaptool: info: copying image 'image.wic' to block device '/dev/sdb' using bmap
file 'image.wic.bmap'
bmaptool: WARNING: failed to enable I/O optimization, expect suboptimal speed
(reason: cannot switch to the 'noop' I/O scheduler: [Errno 22] Invalid
argument)
bmaptool: info: 100% copied
bmaptool: info: synchronizing '/dev/sdb'
bmaptool: info: copying time: 1m 57.6s, copying speed 4.8 MiB/sec
If I cat the scheduler file I get the following:
$ cat /sys/dev/block/8:16/queue/scheduler
[mq-deadline] none
The following patch fixes the warning, but not the performance issues:
diff --git a/bmaptools/BmapCopy.py b/bmaptools/BmapCopy.py
index c066828..d17e98b 100644
--- a/bmaptools/BmapCopy.py
+++ b/bmaptools/BmapCopy.py
@@ -715,12 +715,13 @@ class BmapBdevCopy(BmapCopy):
The old settings are saved in order to be able to restore them later.
"""
# Switch to the 'noop' I/O scheduler
try:
with open(self._sysfs_scheduler_path, "r+") as f_scheduler:
contents = f_scheduler.read()
f_scheduler.seek(0)
- f_scheduler.write("noop")
+ f_scheduler.write("none")
except IOError as err:
_log.warning("failed to enable I/O optimization, expect "
"suboptimal speed (reason: cannot switch to the "
Weirdly enugh NOOP ioscheduler is enabled on the kernel config:
$ cat /boot/config-4.17.0-1-amd64 | grep NOOP
CONFIG_IOSCHED_NOOP=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_BRIDGE_IGMP_SNOOPING=y
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.17.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages bmap-tools depends on:
ii python3 3.6.5-3
Versions of packages bmap-tools recommends:
ii bzip2 1.0.6-8.1
ii lzop 1.03-4+b1
ii xz-utils 5.2.2-1.3
Versions of packages bmap-tools suggests:
pn lz4 <none>
pn pbzip2 <none>
pn pigz <none>
pn python3-gpgme <none>
ii unzip 6.0-21
-- no debconf information