group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #18781
[Bug 1482994] Re: creating swap with dd is slow
** Changed in: curtin
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1482994
Title:
creating swap with dd is slow
Status in curtin:
Fix Released
Status in curtin package in Ubuntu:
Fix Released
Status in curtin source package in Trusty:
Fix Released
Status in curtin source package in Xenial:
Fix Released
Status in curtin source package in Zesty:
Fix Released
Status in curtin source package in Artful:
Fix Released
Bug description:
Currently swap file is created by dd command. It takes time linearly
correlate with the size.
> 34359738368 bytes (34 GB) copied, 154.964 s, 222 MB/s
It would be nice if curtin used "fallocate" if available instead of
dd. It should finish in a second.
[curtin/swap.py]
83 msg = "creating swap file '%s' of %sMB" % (swapfile, mbsize)
84 fpath = os.path.sep.join([target, swapfile])
85 try:
86 util.ensure_dir(os.path.dirname(fpath))
87 with util.LogTimer(LOG.debug, msg):
88 util.subp(
89 ['sh', '-c',
90 ('rm -f "$1" && umask 0066 && '
91 'dd if=/dev/zero "of=$1" bs=1M "count=$2" && '
92 'mkswap "$1" || { r=$?; rm -f "$1"; exit $r; }'),
93 'setup_swap', fpath, mbsize])
To manage notifications about this bug go to:
https://bugs.launchpad.net/curtin/+bug/1482994/+subscriptions